Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

128 Spectacular

About JBenghiat

  • Rank
    500 Club

Personal Information

  • Homepage
  • Location
    United States

Recent Profile Visitors

2,547 profile views
  1. JBenghiat

    [Worksheet] Getting Total Distributed Weight

    You're right — I was recalling from memory. The internal unit is in grams.
  2. JBenghiat

    [Worksheet] Getting Total Distributed Weight

    There are two fields for weight, text and numeric. The numeric field is in kg, which are universal mass units for VW. The text field displays the weight in document units.
  3. @scottparker In your Resource Manager click New Resource, and select type Script. You may also have to create a new script palette. Keep track of what you name the script resource. In the resulting Script Editor dialog, choose Python from the pull-down menu at the top. Copy and paste in the line of code above and exit the dialog. In your worksheet, go to your header row, and select the column where you want the truss name to appear. Paste in: =RUNSCRIPT('SCRIPT_NAME') replacing SCRIPT_NAME with whatever you chose to name your script resource in the first step.
  4. JBenghiat

    Lighting Paperwork

    The shop order I send out is a Word template. I'll use a combination of VW and LW to do counting, depending on the project and what I'm counting, but I don't want the process to be automated: the shop list contains spares, notes, and detailed specifications that I'm not getting from a pure count. That said, what I usually generate is a bid list from a designer's perspective. I'm not doing any kind of electronic prep work where I may have documented every cable, accessory, and piece of iron. etc. in either VW or LW's database.
  5. JBenghiat

    Lighting Paperwork

    For cable: Spotlight>Reports>Create Cable Worksheet... The default inventory reports generally match used to inventory totals and use the symbol name, not the instrument type. To make a custom report try Spotlight>Reports>Create report… with the settings below. All worksheets are available in the Resource Manager.
  6. JBenghiat

    Class Creation during a tool's DoSetUp (Beta Undo Alert 9)

    You see this alert any time an action changes the document without properly registering with the undo system. It could be your code or it could be from another module. If you are running a debug session, you can pause execution when the alert pops up and try to track it down.
  7. JBenghiat

    How to detect screen plane/layer plane?

    Try GetPlanarRef(). I can’t recall off the top of my head if 0 is ground or screen.
  8. JBenghiat

    How do I only update one sheet layer?

    Put the walls in a unique layer or class, and then in Object Info for the viewport, his/show as desired. Any time you make a change to either design layers or Obj Info for a Viewport, you need to update the Viewport to see changes.
  9. JBenghiat

    Module registration order

    The approved way to get modules to communicate with each other is via interfaces, described here: http://developer.vectorworks.net/index.php/VCOM:VCOM_(Vectorworks_Component_Object_Model). For every plug-in library, write an interface for accessing the classes provided by the plug-in. When you access the interface, you are creating a pointer to it, so by checking if the pointer is null, you can avoid crashed if the plug-in didn’t load or is not present. All the modules register and then run, so the order shouldn’t matter. If I’m reading your post correctly, you have code that governs registration for one module in another module. This would take it out of the VCOM model, and I don’t think this is sanctioned. Your best options is probably to just share code files among projects, so each .vlb contains an independent copy of your preference-reading code.
  10. JBenghiat

    Attribute Criteria PP= is not working

    PP is for pen pattern. What you want is LT, which takes the name of the line style. Using the criteria can be useful to get the syntax correct. Criteria can also be finicky with variables. You often need to pass the entire criteria as a string with escaped quotation marks around any string values. e.g.: crit := Concat('((T = Line) & (PP = ''', Line_Index, ''')))'); FEO( Do_This, crit); You can also concat Chr({ADCII_CODE_FOR_SINGLE_QUOTE}) instead of using the 'x3, but I don't have that off the top of my head.
  11. That’s definitely unusual. I would try restarting your computer and trying with VW being the only app running. Other applications, particularly web browsers, can start competing for resources. If the problem persists, contact tech support and have them walk you through sending in your log files.
  12. JBenghiat

    Tool using TrackObject

    There’s no secret, unfortunately, other than to create a menu command instead of a tool. This is actually what got me started on the SDK.
  13. JBenghiat

    GetName not working

    Sorry, misread your example. Though, similarly, there is a special function to get the name of a symbol: GetSymName() You can also take a shortcut to the first selected object: FSActLayer
  14. JBenghiat

    GetName not working

    Layers have their own name function: GetLName()
  15. JBenghiat

    What's the highest Number?!

    You probably want to move this over to the scripting forum. There’s no magic bullet here, especially to work universally, but the algorithm is fairly straight forwards: Define a global variable = 1 iterate through objects with a ForEachObject command Get the value of your ID field and convert to number if the value is greater than the global, set the global to the value once through all the objects, return the global


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.