Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by JBenghiat

  1. 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.
  2. 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.
  3. 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.
  4. 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
  5. JBenghiat

    GetName not working

    Layers have their own name function: GetLName()
  6. 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
  7. Do the symbols already exist in the file you are trying to import in to? If so, check that the symbols are using the correct insertion point. Did the file already have lighting devices, either on other layers or that had been deleted? That would cause the UID’s of the lights you are importing to reset, which might then cause an improper association between instruments and accessories. Finally, you may want to try copy and paste-in place instead of importing. Pasting triggers some UID error checking that I believe does not happen with importing the layer. Pasting in sections of the plot at a time may be the way to go. And finally, finally, you may want to start with importing the lighting layer into a new file, and then import the other layers from your second file into the new file. If the issue is indeed UID related, this will give the imported Lighting Devices first crack at unique names and will preserve the instrument / accessory associations.
  8. I'm not seeing any issues. Are you importing via New Layer in Organization, or via copy and paste? Does either document have a user origin defined?
  9. JBenghiat

    Video Projector beam

    Yes, it's currently compatible with 2018 and 2019.
  10. JBenghiat

    Can't Move Label Legend Individually

    Check that the symbol has a 3D component, or that it is in the screen plane. The control points are screen plane objects for Lighting Devices, so you will only see them if the symbol is also in the screen plane. Hybrid symbols always have a screen plane component by definition, so you always see the control points in Top/Plan.
  11. JBenghiat

    Video Projector beam

    Take a look at: https://www.benghiatlighting.com/index.php?option=com_content&id=117
  12. JBenghiat

    Spotlight - script move of legend points?

    It’s a JSON string. You can parse it manually in VS, but python has built-in JSON libraries. If I recall, you also need to update the apropriate control points.
  13. JBenghiat


    Plug-ins essentially store parameters identically to record data, so a plug-in script can use Set/GetRField to access the data, for example to create text from that data. You can also run reports on plug-in parameters. If you're going the plug-in route, you would have parameters for all the elements you would need for the plug-in to draw the panel. You could save the plug-in as a "Red" symbol (if you're unfamiliar with the term, that's what to search for in the help) for different models. You can indeed have plug-ins inside other plug-ins, calling CreateCustomObject() from in the PIO code. Another way to think about the problem is to still base the PIO on symbols, but have a PIO that uses the symbol for geometry and handles the labels and data management. If your combined screen also needs to have the labels, it could actually also do the work of placing a label for each panel.
  14. JBenghiat


    You may need to attach the record before linking the text. I would suggest doing a manual link in an otherwise blank file, then exporting to script. Examine the script to check order of operations. That may also reveal something silly, like a spelling error. I do have to ask, if you’re coding this, why not just create a plug-in object? That would save you from having to figure out link text to record.
  15. JBenghiat


    You need to attach the record to the symbol. Add as the last line: vsRecord(vs.LNewObject(), ‘L ED Install Panel’ )
  16. JBenghiat

    Setting Hybrid symbol fill

    The Truss object has a symbol field — so not too hard — just get the name of the symbol and a handle to the definition with GetObject(). When you reset the Truss object, is should replace the contents of the profile group with the modified truss symbol. In theory.
  17. JBenghiat

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

    The general practice would be to do something like: // Create class newClassName if (VWClass::IsValidClassName(newClassName)) { gSDK->SetUndoMethod( kUndoSwapObjects ); gSDK->NameUndoEvent("Create default classes"); VWClass classObjNew(newClassName); MCObjectHandle classH = gSDK->InternalIndexToHandle(classObjNew); gSDK->AddAfterSwapObject(classH); gSDK->EndUndoEvent(); }
  18. JBenghiat

    selecting lighting units???

    This menu is a filter. If you have lots of kinds of resources in a document, this lets you only see the resources that interest you, for instance if you are looking to just browse textures and ignore a long list of symbols. I believe that All Resources is the setting for new installations — if that is not what you experienced you may have discovered a bug or inherited a setting via the Migration Manager. It's worth noting that when you have the Lighting Instrument Insertion tool selected, the resource manager dropdown in the mode bar is not subject to the filters, as this is automatically filtered by the tool's code to always and only show you lighting device symbols.
  19. JBenghiat

    Setting Hybrid symbol fill

    2D and 3D objects are all together, so start with FInSymDef() and traverse the list. If you want to set attributes differently for 2D and 3D objects, you have to check the object type to see if it is 2D or 3D, and if 2D check to see if the planar ref is set to zero (screen plane).
  20. JBenghiat

    Creation of temporary objects while tool is active

    The Setup/SetDown events run when the tool is selected and de-selected. You might want to try as part of the GetStatus or UpdatePreview events. You may also need to manually invoke a screen redraw.
  21. JBenghiat

    Vectorworks is REALLY SLOW lately!

    Normal drawing activities, like moving or dimensioning, shouldn’t have a delay. Have you tried testing in a new document? That would determine if something is amiss or inefficient about your file. If you have a lot of verticies or end points, particularly with imported geometry, that can slow things down when you are snapping. Adjusting snap and or layer options can help, as otherwise you are asking Vectorworks to provide hundreds of SmartCursor cues in a short time. 2019 added caching of sheet layer viewports. You may notice a slight delay when first navigating to a sheet layer, but then navigating within that layer should be significantly faster. If you are noticing long delays, submitting your file as a bug will help Vectorworks improve this feature.
  22. JBenghiat

    Texture on floor

    In your texture options, you have the part selected as overall. You can have separate selections for top, bottom, and sides.
  23. JBenghiat

    Lock Model lights on the Z plane

    You may have misunderstood one of my suggestions, as wireframe and light visibility isn't a factor for any of them. If you're reacting to the Top view suggestion, you can still be in wireframe in a Top view. Also FYI, if you're using viewports for your final renders, you will never see the light geometry, regardless of the preference.
  24. JBenghiat

    Lock Model lights on the Z plane

    As you've discovered, you are seeing the light snap to geometry below. In addition to suspending snapping, you have a few additional options to prevent this: - Place light objects in their own layer. You can then set your layer options to one of the Show Others modes and avoid snapping to lower objects while still allowing light objects to snap and align to each other. I recommend having a layer for render lights even if you use one of the other methods. - Use the Move by Points tool with Object Retention mode off. This should keep the move action co-planar while still allowing you to snap to objects below. - Move in Top view as opposed to Top/Plan. That seems to avoid snapping to objects in 3D planes.
  25. JBenghiat

    Resource manipulation

    Yes, you can use scripting to work with resources. Unless you are always performing the same action or looking to do batch modifications, making the scripts isn’t necessarily faster than using the resource manager, though.


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.