Jump to content

JBenghiat

Member
  • Content Count

    1,156
  • Joined

  • Last visited

Community Reputation

220 Spectacular

About JBenghiat

  • Rank
    1000 Club

Personal Information

  • Homepage
    https://www.benghiatlighting.com
  • Location
    United States

Recent Profile Visitors

3,401 profile views
  1. I've just made a lot of rectangular PIO's 🙂
  2. No - built-in control points are planar for plug-in objects, so you're not going to be able to manipulate the shape of the object in 3D, only in Top/Plan. To add 3D control points, you have to use the SDK.
  3. @scott moore 3D Symbol Name - This is a vestigial field from on old idea. You can ignore this or use it to store anything you wish. Model Name - The Instrument Summary displays this field. This is intended to be more of a specification — if I was using a worksheet as the starting place for a shop order, I would use this field's data. e.g. ETC Source Four 10° w/ double clutch Instrument Type - What would appear in hookups and schedules. Usually more succinct, e.g. S4 10. This field is usually what syncs to the type field in Lightwright. Fixture ID - This is the type identifier that gets passed to Vision, as well as the lookup value for the fixture mode pulldown in the OIP. @marcuswimmer Go to Spotlight>Reports>Lighting Symbol Maintenance...
  4. Edit the Model Name of the Light Info Record attached to the symbol definition. You can do this easily with the Lighting Symbol Maintenance menu command.
  5. Just adding DefineCustomObj() everywhere may be doing more harm than good. You should not need this anywhere in the code — my suggestion was based on the assumption you were placing custom objects via scripts, which is when the call is needed. As far as I can tell, you are only using SetRField in a button event. You can view the scope of each event running separately. I also noticed EditSubGeometry calls NewField() on the plug-in record. You should never modify the plug-in record via VectorScript, so that could be causing issues. Only use the Plug-in Manager to edit the parameter format. I would recommend stripping the code down to only the reset event to troubleshoot, and getting rid of all your DefineCustomObj calls for now. One of my initial suspicions is that your code isn’t handling events correctly. You may also want to restructure your code a bit to make it easier to troubleshoot. In some cases, you seem to be using subprocedures in lieu of commented code blocks, which could be causing scope issues. In contrast, one place where I do recommend subprocedures is for each event type (currently they are all inline in the case statement), which lets you write a simple main function with an event handler and clarifies that each handler should have its own scope.
  6. Ah, a good amendment to the rules. (I usually don't bother with 3D for most of my multi circuits) The rules above still stand for the minimum requirements for a multi-circuit composite symbol, however: - If you want the 3D component of the multi circuit to tilt to a focus point (or the default angle in Spotlight settings), add two 3D loci through with the lighting instrument's tilt axis passes. Multi-circuits seem to assume a two point attachment and only tilt. There's a few cyc units out there that can pivot from a single clamp, but that seems to be outside of what VW can model.
  7. Your best solution is to duplicate the symbol in the Resource Manager and provide a Top/Plan view for the required rotation. In 2020, you would set the Y Rotation at the top of Object Info to 90. Prior to 2020, 3D rotations are towards the bottom of Obj Info.
  8. If memory serves me, right-clicking on the PIO and choosing Properties will force the OIP to refresh. I think I filed this as a bug a while ago, but it doesn’t affect event based or SDK PIO’s, so haven’t encountered it in a while.
  9. I’m not nearly as generous with my time as @PatStanford, but I do know the ins and outs of vs fairly well. 🙂 GetObject() will return a handle to the object with the name you pass to it. Every PIO has a record format with the same name as the PIO. In terms of object type, it is exactly the same as a data record format. VW creates the format when you first insert the PIO or open its default settings in the mode bar. In your case, you have an issue with the code, though. You are calling LinkText() which is for creating symbols with text linked to record fields. You do not need this for PIOs, and in fact the use here is causing the text to always be one step behind. The PIO will completely redraw it’s contents any time you change a parameter, so simply creating the text is enough. If you are setting the parameter via another script, call ResetObj() to get the values to update. You also don’t need to use GetRField to get the parameter value, unless the text is more than 255 characters or you use SetRField elsewhere in the script. Usually you can just use PParameterName, which is essentially a constant at run time with a type matching the parameter type.
  10. I alluded to this in my first post. To get a handle to the plug-in’s record, use GetObject(plug-in_name). If the handle equals NIL, it doesn’t exist. But I would still revisit your issue in general. Plug-in objects shouldn’t need any special handling to display their default values on the first insertion. Something is either wrong with the structure of your code or the way you are retrieving parameters. Can you post some sample code?
  11. SetParent() does work for placing resources in folders, but as you observe it fails for symbols. I suspect this is due to somewhat simplistic error checking; you can't place a record in a symbol folder, only a record folder, etc. I'm guessing you are restricted from placing a folder in a folder via script. I would file this as a bug, and if it's WAD have it moved to an enhancement request.
  12. Multi-Circuits are still inserting correctly for me in SP3. If you find a symbol in the Content is not inserting as a Multi-Circuit, please report that symbol to Vectorworks — the bug is with the way the particular symbol is constructed, not with the Multi-Circuit process. To answer the question a little differently than @markdd, in order for a symbol to insert as a multi-circuit lighting device, the following must be true: - The symbol must contain only symbols. Use the Symbol Insertion tool to insert each cell as a symbol, not a Lighting Device. - Each symbol must have the Light Info Record attached. Attaching the Light Info Record to the composite symbol has the following advantages: - Double-clicking on the symbol in the Resource Manager will activate the Lighting Instrument insertion tool (otherwise, you will need to select the symbol via the mode bar menu of the tool). - The composite symbol will be available in the Instrument Summary
  13. I would think SetParent() should work. You can also try InsertSymbolInFolder()
  14. What you are seeing is not expected behavior, then. You should see PIO defaults on the first insertion. Is your PIO event enabled? If so, you may have code allocated to the wrong events.
  15. I'm not completely sure I understand the question: are you placing a PIO via script and immediately trying to access its data? You can run https://developer.vectorworks.net/index.php/VS:DefineCustomObj to create the record first (you can get a handle to the PIO's record by its name and check for nil). Otherwise, the PIO doesn't actually create it's record until after the vs runs.

 

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