Jump to content

Miguel Barrera

Member
  • Content Count

    656
  • Joined

  • Last visited

Community Reputation

18 Good

2 Followers

About Miguel Barrera

  • Rank
    500 Club

Personal Information

  • Occupation
    Civil Engineer
  • Hobbies
    computer programming
  • Location
    San Antonio, TX

Recent Profile Visitors

2,526 profile views
  1. But sometimes the result outweighs the pain of writing Python. Although I still prefer vectorscript because I am more familiar and it is easier to debug, python has access to most functions outside of VW and you could script almost anything. I have been able to directly import from and export to excel files which is not easy to do in vscript so learning and coding in python was well worth it
  2. The difference is that the old returns a real which is the angle in the x-y plane while the new returns a vector which describes an angle in 3D space. I have not used it but I suspect that this is a unit vector so an angle in the x-y plane will return a vector with values between 0 and 1 for the x and y values and zero for the z angle.
  3. You can use the vectorworks text menu to set the text of a pio by adding this command in the reset procedure. SetObjectVariableBoolean(pioHdl,800,TRUE);
  4. Before we had the ability to compare old values with new values, I stored the old values as a CHAR DYNARRAY. In some cases, where the values were points, I separated x,y,z with commas and separated each point with a semicolon.
  5. why individually? you can change all the selected objects at once. let me also say that most objects I create are custom made so the scripts assign their classes automatically and I do not have to do the post-classing for every object created.
  6. Of course it is not everyone's workflow since you already mentioned that you pre-class the objects and that is your preference. However, VW gives you the choice to do it either way. If the intention of the programmer was to corner you to do it only one way, then he would not allow you to change it in the OIP.
  7. In my workflow I always create objects in the "None" class ,then after the object is created I change the class to the correct one in the OIP at which time I will get the color feedback so I know it is in the right class.
  8. In windows there are multiple copies of odbcad32.exe so you need to find which one is visible to VW. I did a search on the windows folder and found 4 copies. The most relevant however, are located in the C:\WINDOWS\SysWOW64 folder, which applies to 64 bit applications, and the other is in the C:\WINDOWS\System32 folder, which applies to 32 bit applications. If it does not appear in the VW dialog, then you need to configure the other odbcad32 administrator. In my system, I found that the one in SysWOW64 works with VW.
  9. Meaning just like you create hybrid symbols. You include both a 2D and a 3D object(s)
  10. I noticed that you placed the pio in Plan View which is a 3D view. That explains to some degree why the extrude fails and the pio disappears. Since the extrude fails for whatever reason, you are left with a rectangle and a circle which are 2D objects and you cannot view these objects in Plan View. It is only when you switch to Top/Plan that they reappear. the solution would be to create a Hybrid object. That is create the rectangle with the circular hole first in Top/Plan view and then duplicate and extrude the copy to create the 3D part.
  11. Parameters are only for plugin OBJECTS, These you create yourself if you want the user to enter a value such as dimensions of rectangle, radius of circle, etc. which will be listed in the Object Info palette. Since the sample script is a COMMAND, it does not have any parameters defined.
  12. As JBenghiat said, there is no way to create a pulldown with submenus out of the box but you can simulate something similar. Before the tree control, I had the same problem trying to show symbols located in subfolders. It has been a long time but I think what I did was to mark folders that had submenus. When the user click the marked folder, I would clear the menu and show the contents of the parent folder with the parent as the first item and then the contents offset by a couple of spaces. When the user clicked the parent header folder, I would show the higher level once again. Of course you need to keep track somehow the relationship between parent and nested items or folders.
  13. You could also export the file as a vectorscript text file. This will show how vectorworks creates the nurbs curves as a script. It is very accurate for simple geometry but it tends to skip objects with more complicated geometry.
  14. Make sure that the profile object is a group as in: BeginGroup; profileObjects EndGroup; profileHdl:= LNewObj; I have not come up with the offset elevation problem because I do keep the insertion point at 0 elevation for all PIOs. However, I do have to place the PIO at the same elevation as the terrain model. Rather than change the layer elevation , I move the entire object to the desired elevation as in: PROCEDURE SetElev(objHdl: HANDLE; org3Dz,elev: REAL); VAR dz: REAL; BEGIN dz:= elev - org3Dz; IF dz <> 0 THEN BEGIN Move3DObj(objHdl,0,0,dz); ResetObject(objHdl); END; END; I did have a problem at one time with the change in elevation not showing so I had to add the ResetObject to fix it.
  15. Do you need to see the graphic of the symbol? If not, why not just add the symbol name to a popup parameter. I have not used vsoButtonGetResource because it is only available from VW 2018. I created the following dialog in 2014, Select Sign Legend, which would be similar to that. The dialog is activated by clicking on the OIP LEGEND button and the selected sign is store in the Sign Type parameter. Other parameters get their value from the record attached to the symbol. The following is a variation of the same idea but the dialog has a tree picker control instead. I created this plugin to scale symbols before the capability was added to symbols.

 

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.

×
×
  • Create New...