Jump to content

Miguel Barrera

  • Content count

  • Joined

  • Last visited

Community Reputation

6 Neutral

1 Follower

About Miguel Barrera

  • Rank
    500 Club

Personal Information

  • Occupation
    Civil Engineer
  • Hobbies
    computer programming

Recent Profile Visitors

1,198 profile views
  1. And if you are creating a hybrid (2D/3D) object, you can use GetSymLoc3D() to find the z location of the object's origin. If the document's page center is other than (0,0) you will also need GetOriginInDocUnits() which should be added to GetSymLoc to get the correct coordinates.
  2. return index of pop-up in PIO

    try: FUNCTION GetPluginChoiceIndex( inPluginName :STRING; inParameterName :STRING; inChoiceName :STRING; VAR outIndex :INTEGER) : BOOLEAN;
  3. Export drawing into text format.

    My question would be why do you even want to export to excel in the first place? If it is for some kind of mathematical analysis, then why not do it in VW with scripts?
  4. Index of Events - Where is it found??

    In order to parse the events, you will need to call vsoGetEventInfo( outObjEvent :; outEventData :); the first variable is the event number, and the second is additional info on the event. In the case of a button hit, the second variable will be the button id that you assigned when the button was created so there is no error generated if the button has the same id as an event. As a practice however, I do start buttons in the 1001 range to avoid any conflict with buttons defined in vectorworks.
  5. Worksheets

    yes, you can also link several worksheets to a main worksheet by reference.
  6. Sorry I cannot help you with your Mac. The last time I owned a Mac was in the early 2000's. I have developed a VS plugin that searches for information contained in an excel file through a Windows ODBC driver and manager app, which are included in the Windows OS. For the Mac, if there is no ODBC manager included in the OS, you can get one from http://www.odbcmanager.net/ There is also a guide to install and configure a filemaker ODBC connection here (Chapters 3 & 4): https://fmhelp.filemaker.com/docs/16/en/fm16_odbc_jdbc_guide.pdf
  7. Don, you can do a lot more with the database through programming than just a simple one to one relationship as it is in the VW interface (link a row to an object with a common key field). You could for example, import a database or spreadsheet into a VW worksheet by choosing the file from a folder dialog or do searches to get a particular data, etc. I think that those that have not worked with ODBC, do not know that the first step is to connect the database to the ODBC driver, which translates the original format to a SQL database. This is done in the OS and not in VW. In windows you use the ODBC Data Source Administrator (odbcad32.exe) to make an ODBC alias. The alias then can be connected to VW through the "Manage Databases..." menu command. You can't make it simpler than that due to all the different databases around. I have done some research and found that the first step can be done in python with the following code: import pyodbc # Specifying the ODBC driver, server name, database, etc. directly cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=localhost;DATABASE=testdb;UID=me;PWD=pass') # Using a DSN, but providing a password as well cnxn = pyodbc.connect('DSN=test;PWD=password') # Create a cursor from the connection cursor = cnxn.cursor() so it is feasible to do all the connections within Vectorworks to access the data.
  8. You can also use ODBC to connect to databases either from VW directly or programmatically with vectorscript. You can find a connection example at http://developer.vectorworks.net/index.php/VS:DBDocAddConn and all routines at http://developer.vectorworks.net/index.php/VS:Function_Reference#ODBC
  9. Removing jaggy bits from model!

    Adding 3D polygons between co-linear 3D points should fix the problem. As illustrated in your images, there are some points that cross the co-linearity of the the 3D points but if you add a 3D polygon or line, the DTM triangulation algorithm will not cross the line.
  10. Excel Import / Export + Direct Link

    You can link an excel file as a database to a VW file with ODBC. You will need to setup the excel file with an ODBC driver, which is a formatting protocol that reads the header row as record fields and subsequent rows as data records. I am not sure about Macs but Windows already comes with MS drivers like excel, access, etc.
  11. convery to marionette network

    It should be just a matter of converting the object from python since we can already export a file as a script. For some of my plugin objects, I did model them manually first and then export them as vectorscript to copy the object code.
  12. It will take some work to automate and fill the record fields but is it really worth the effort? when you attach the record to the extrude, the dimension data is just one tab away in the object info. Moreover, what if you decide to include other data such as material, cost, part number, etc.? you will still need to enter this info at some point in the process.
  13. Importing Tab-Delimted Text Files with blank spaces

    I often import text files and found that comma delimited (.csv) formatted files are better to account for the empty fields. Most databases and spreadsheets have this option also for export/import so I am guessing that Filemaker would not be the exception.
  14. I entered the data manually but it is only once inside each symbol definition since the record is attached to an extrude rather than the symbol. The length, width, and thickness could be automated with a script, but other fields such as unit price would have to be entered manually (or from an external database?).
  15. line-weight, The solution was to create a record with the code, length, etc fields and attaching the record to the extrude inside each symbol. After populating the fields with data, I created the worksheet with a database row that calls for all objects with the record "Cabinet Part" attached and checking components of Symbols also. Note that columns with the SUM option will display the unique values while columns without it will display the addition of the values. shelving_sample.vwx


    • 7150 Riverwood Drive
    • Columbia, Maryland 21046, USA
    • Contact Us | 410.290.5114


  • © 2018 Vectorworks, Inc. All rights reserved.
  • Vectorworks, Inc. is part of the Nemetschek Group.