Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by JBenghiat

  1. You can use https://developer.vectorworks.net/index.php/VS:OLDMassRealToStr and the other similar commands. Anywhere the mass gets stored, the units are in grams.
  2. Data gets stored in a field called WeightDouble, though it's always in grams, so you have to remember to convert the result to whatever your document units may be.
  3. What render mode are you using? Custom Renderworks has an option whether to render shadows. Do you have a texture applied to the objects receiving light?
  4. Are you looking at the drawing of the actual projector or visualizing the image? For the video screen tool, you can select an aspect ratio that is inverted, for example 9:16 is an option. For the projector symbol, you have to separately swap it out with one where the projector is oriented on its side. The standard library has side versions for all the projectors. I offer a plug-in called ProjectionViz that focuses more on planning and image visualization than the physical screen and projector. You can set the projector to any rotation along its axis, and parameters like lens shift function as they would in real life. If you display a projector at the projection cone, the symbol will rotate in 3D along with the image, though the 2D representation does not change. https://benghiatlighting.com/software/products/pv-1
  5. Yes Assuming you would want the breaker ID to apply to all cells in a multi-cell, yes. I’m actually not sure what would happen if you have discrete data in Beaker ID and then call SetRField. Yes. Using a cell index of -1 and 0 is effectively the same for a one cell lighting device. Yes No idea, but it’s from 2019, so not relevant to the data discussion. I think it relates to your next question. No idea what this does, but Layout is a dialog ID and Control is an item in the dialog. My guess is this fills a symbol resource picker with eligible lighting device symbols and selects SymbolName. Anything in the edit mode is just there for editing. I can’t remember if the accessory objects are PIOs or if the objects just have a special object info display (like text in Data Tags or Title Blocks). The edit objects get created at edit time, and then the data, location, and orientation write back to the Lighting Device on exit.
  6. There’s a bug where if any of the component symbols (L, C, R) include a symbol, label legends don’t place correctly. Otherwise, you should see a label legend at the insertion point for each of the component symbols.
  7. For 2021, there is no separate accessory object. There are objects that represent the accessory geometry, but the data stores in a data structure attached to the lighting device. So there really is no handle to an accessory any more. The new function call looks at the data structure attached to the lighting device and retrieves data by cell index, accessory index, and field name. If you want to see which fields can hold discrete data for cells and accessories, open Spotlight preferences and look at the parameter list. The two right columns of check marks show which data can be discrete.
  8. You almost answered your own question. https://developer.vectorworks.net/index.php/VS:GetFileN
  9. See https://developer.vectorworks.net/index.php/VS:BuildResourceListN and https://developer.vectorworks.net/index.php/VS:BuildResourceListN2
  10. The problem is that when you remove choices, each removal changes the list. For example, if you have n choices, removing choice 0, you now have n-1 choices. Removing choice 1, you have n-2 choices, etc. About half way through the range, you'll be trying to remove choices that don't exist. Two options: You can remove items from last to first, which preserves the list as you remove options. You can remove choice 0 n times. That essentially pops the front choice off the list until the length of the list is zero. Separately, any actions in python, even if they are illegal, should produce an error message and not crash Vectorworks. I recommend also reporting this as a bug.
  11. You’re thinking of a regex string, which still needs a function call in python. Do a web search for python strings. You should be able to find a substring call. I believe the keyword “in” will work as well (“BST” in outValue).
  12. You can use the imp module to force externals to re-import. See here:
  13. Is there a way to tell if a plug-in object is rotating based on input in the OIP rotation field as opposed to rotation via a tool or menu command? Other than setting kObjXPropDontShowZRotation to true and manually adding an angle widget that gets actively managed in the shape pane provider.
  14. The arc-type vertex is based on a radius and a tangent point. As long as both segments share an end point, they should be tangent. Otherwise… maths. https://developer.vectorworks.net/index.php/VS:ArcTo
  15. You can think of the knot as the point where the mathematical function defining the curve changes (that would be the non-uniform part of Non-Uniform Rational Basis Spline). I think your best option is to create the arc via a 2D arc method, and then convert to NURBS.
  16. The only significant change that would affect 2021 is the way accessories work. Parsing the drawing to flag used vs unused accessories and get counts is going to take a bit longer. I can't speak for what specifically did or did not get updated in the code. To reiterate, missing Light Info will actually speed things up, not slow them down. Purging unused symbols will cause the biggest efficiency improvement. The only other issue would be anything that slows down accessing the resource list. If you are using references or workgroups, and either the reference is broken or the network is being slugging, that could slow things down. Your best resolution is to submit a bug report with the slow file attached.
  17. The container doesn't actually place based on the label legend — it's just there as a guide. The insertion point of the container symbol gets placed at the insertion point of the label text. Check how the container aligns in the symbol definition and make sure that the insertion point of the text block is centered.
  18. A few things to look at. Likely the CreateImageProp call is returning a NULL handle, as some of the options may not be working as expected: - InternalIndex is 0 — this needs to refer to a texture resource, so this will definitely fail - You're creating a symbol, so if the call succeeds, VW will create a "red" symbol for the image prop with every reset event. A larger issues is that this command will take a number of steps to convert a texture to an image prop, and doing this inside the reset event will go through those procedures every time the object redraws, going you lots of copies of the texture. First, check to see if the texture "propName Prop Texture" already exists. You have a couple of options. One is to create the image prop in the profile group, and then copy to the main container on reset. Create / delete and re-create the image prop in the profile group when you need to update the image. The other is to create the image prop as a PIO with CreateCustomObject(). The texture just applies to the PIO. You can either manually code the texture creation, or only run CreateImageProp() if the texture doesn't already exist.
  19. Where/how are you calling RefreshPanels()? Is the specification object still creating geometry? As a side note, vs.ResetObject() already is a function that takes a handle as a parameter, you you can pass it directly to ForEachObject()
  20. You can also pass 0 to the delta, which should only give you a contour at the cut plane and effectively give you the same result.
  21. Any shape or particular shapes? You can use ISDK::CreateContourCurves() to get the NURBS intersection and then ISDK::ConvertNurbsToPolylineArcs() If I know the shapes (I do a lot of intersecting cones and planes), I just do the math.
  22. Please file a bug report and include the file https://www.vectorworks.net/support/bugsubmit. The summary hasn't received an update in a while, and there are some faster ways to do things. Generally, purging will make a huge difference. The setup dialog looks through your resources for symbols with Light Info attached, and then looks to see if they are in use by any Lighting Devices. If you have thousands of symbols, that could take a while. The lack of a Light Info Record will prevent the symbol from showing up on the list of candidates or from having any data in the Summary, however, a missing LIR shouldn't slow the process down. In theory it would speed it up.
  23. I'm fairly sure the SDK doesn't have any built-in conversions for boolean strings. As a check, though, you can convert the string to uppercase and compare against "TRUE" and the localized true converted to upper case. Then return the localized value for true or false accordingly. When you write to the field, use SetParamBool() to ensure the correct format. I believe that regular record fields are localized but PIO fields are not. I could be wrong, though.
  24. It’s a localized string in Vectorworks.vwr. Try looking in “11000.vwstrings”.
  25. A hanging position is just a PIO, so you can just insert as a custom object and set the fields. If you want it to be geometry based, put the object you’re converting into the profile group. Note, the universal name is something like Light Position Obj. Debug List View is your friend here.


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...