Jump to content

Miguel Barrera

  • Posts

  • Joined

  • Last visited


26 Great


Personal Information

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

Recent Profile Visitors

3,779 profile views
  1. With Python you should be able to find out.
  2. Have you tried placing each resource file in different folders?
  3. After working with CAD for the last 35 years, I think working at scale is best because it promotes the paradigm "what you see is what you get". I hated working with Microstation (1:1 scale by definition) because I had to guess the output (print) scale
  4. I think the biggest advantage of using vectorscript is the built in debugger. Although is possible, according to the python pages, to uas a third party python program to debug, the instructions are vague and I have never been able to successfully get the remote debugger working. If Nemetschek would add a native interface with a debugger, python would be the better choice because it can interact with data and systems outside of vectorworks.
  5. Yes, the buttons can only be created with an event enabled script, Sorry, I am so use to them that I overlooked this fact. See Object events , example 3, for the button creation. But the code could work with a field that can register the change such as a check box.
  6. I have coded something similar to what you want. Several years ago, I faced the same problem where I had a lot more fields than I could display. Although all my plugins are event enabled I came up with this solution before there was event enabled plugins so I do not think it is required. In the following you will see buttons for each section. When you click on each, it will display more fields under it. In the example below, the button "Pole & Foundation" displays a few fields and the button "Ped Push Button" displays only one. When clicked on each of these, they display all the fields associated with each button. The concept is to keep a hidden field with the state of each button. 0 for closed and 1 for open. When setting the field visibilities, I hide the filed if the button is 0 or display the field if the button has a value of 1. In the example below, there are 7 buttons. On the left they are "closed" so the state value is 0000000. When I click on the first, it displays all the fields. When I change the value on the second button from "none" to "2", it displays the fields under that button. The state value is consequently 1100000
  7. I am a civil/traffic engineer and although there are no native tools to do my line of work, vectorworks can be adapted to do just about anything. Since there are no tools, I have developed my own with vectorscrip plug-ins
  8. 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
  9. 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.
  10. 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);
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  • Create New...