-
Posts
2,024 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by JBenghiat
-
-
Is there a custom user origin? I can't remember off the top of my head, but a number of functions always use the internal origin. You need to get the user origin and offer your coordinates by that amount. You may also have to take rotated plan into account.
- 1
-
You could always create a new pop-up parameter in Spotlight Preferences. If you wanted data to auto-enter from the symbol, attach a custom record to the symbol definition, add a field matching the name of your user field, and add the record via Additional Default Records in Spotlight Preferences.
- 1
-
Vectorworks has never had this feature. Are you thinking of the Autoplot Rotate Each commands?
- 1
-
You said you were able to create a PIO with parameter in the OIP. Place this line in the script of the PIO:
Symbol('symbolName', 0, 0, 0);
This will place the symbol symbolName at the center of the PIO, facing up.
- 1
-
I did some experimenting with this a few weeks ago, and there's no easy solution. If you have Lightwright, you can merge in CSV data, keying by channel, and then sync that data with Spotlight. LW handled a patch csv from Eos as expected, without any file cleaning.
- 2
-
It's been a couple years since I experimented, but when I last checked, they way Data Tags copy objects from their profile group (where layout objects are stored) to the object didn't work with PIO's. If I remember correctly, it basically gets converted to group before it gets copied.
-
The symbol insertion code is a one liner: https://developer.vectorworks.net/index.php?title=VS:Symbol
You would ultimately want to do some error checks to make sure the named object exists and is of type symbol definition.
-
@spettitt are you just looking for the label to adopt the class of the rigging object it’s attached to? If so, I think this would be a fairly straightforward feature to add to Savvy Position Labels.
- 1
-
You seem to be describing a Plug In Object. PIOs will create their own insertion tool, with the interface for a point PIO being very similar to the symbol insertion tool.
The script component for a simple PIO should draw the elements you want to display, with the origin of the scripted elements being the insertion point of the object (like a symbol definition).
Your script can insert a symbol at the origin. You can also code all the geometry of the elements you want to draw, and it will appear symbol-like to the user.- 1
-
If it’s for a document-wide setting, you don’t have to attach the record to anything— just use the default field values to store your data. You can get a handle to a record definition by its name.
- 1
-
Seconding Pat's suggestion. Create symbols instead of viewports. Once you're ready to start assigning control data, Convert to group (this is a named command, not to be confused with Group to Ungroup).
You can think of a viewport as a smart photocopy -- a way to duplicate a drawing element for presentation or to show an alternate position.
- 2
-
1 hour ago, spettitt said:
I like the idea of a hidden record - for this and other things. @JBenghiat is there anything to know with making a record hidden, please? From what I can see it involves a double underscore, but I don't know if that's a cause or a symptom.
The double underscore will hide a field. To hide a record, use SetObjectVariableBoolean on the record format with the selector 900. (True is hidden). Usually I check if the record exists, if not, create it, then hide. The record otherwise functions as usual, and you can create a script to toggle visibility as you're testing.
-
Files definitely do not have unique id’s. In fact, I think that’s a feature— if you were to save a backup or a named version, you would want the file to be identified the same.
Storing a UUID in a hidden record would be the way to go, but you would need some kind of manual connection setup between the file and database.
- 1
-
You’re creating a bundle, though you may also want to start with the EmptyModule or TesterModule component example and build from there.
Last time I tired, I still needed to change some project and build settings to get things to compile and run, but that was a while — I have custom xconfig files adapted to my development file structure and flow.
I’ve recently started migrating to a cmake workflow. After getting past the learning curve, setting up new projects, supporting multiple Vectorworks versions, and working cross platform has become much easier.
- 1
-
You still need to define the object being extruded, so don't omit the BeginPoly/EndPoly calls
GetCustomObjectPath works on Plug-in objects -- that won't get the extrude base, as an extrude is a native object type. Use OffsetPoly after EndPoly and before EndXtrd.
-
If this is part of a PIO, use BeginXtrd/EndXtrd instead of HExtrude.
-
I think want to use AddPoint() or Add2DVertex() in your polygon. Also make sure to call SetPolyClosed() to ensure it is a closed object and can extrude. By your screen shot, it looks open.
Using DoMenuText calls in code that also uses handles can be problematic and is definitely not reliable in a PIO.
-
Have you tried the outer boundary mode of the polygon tool?
Otherwise, you’re interested in a concave hull algorithm. You may be able to find some existing python examples, but I don’t think you’ll find a simple code snippet that someone can provide.
- 1
-
Not entirely sure what you’re describing.
Tools>plugins>run script will run a text file as a script
You can also create a script in the Resource Manager and run from a script palette. It saves with the file, not as a plug-in.
-
Short answer -- no. The clip club is just essentially a view. The criteria is actually looking at a visibility flag that's set on objects (which really dates from pre-viewport days) and their containers (i.e. whether their containing layer is set to visible). Your worksheet isn't going to change if you're zoomed in on a group of objects, for example. The Clip Cube doesn't change any visibility flags, it just filters what gets displayed on screen.
From a script standpoint, you could retrieve the clip cube, get its location and dimensions, then parse objects and test if they exist within the cube -- but that is not a small task.
- 1
-
Yes, sorry, I was going purely on memory. vs.Move3DObj() is the call.
https://developer.vectorworks.net/index.php?title=VS:Move3DObj
If you're not familiar with the concept oh handles, you can find a few threads here and on the Vectorscript forum. You would get the handle to the symbol with vs.LNewObj() and then pass that to the move command.
-
You need to use HMove3D() to set the height after inserting the symbol
- 1
-
22 hours ago, FMA said:
This might be a little bit complicated to get around. Is there any way to activate a tool with a key stroke, or to get access to the normal program functions during a loop? Would be great if anybody knows if that is possible. I can share the whole code if needed.
No, not in Vectorscript
- 1
-
Thanks Andy and Sam! ProjectionViz 2 will rotate the projector to the tilt and generate the hybrid Top/Plan view. It will also let you choose the floor plane for visualizing the projector cone (as well as correctly displaying key stoning and lens shift). The Video Screen tool is going to give you a lot more options for showing the details of the projector mount and screen, while ProjectionViz is more targeted towards planning and visualization. It is currently Braceworks but not ConenctCAD compatible.
https://benghiatlighting.com/software/product/projectionviz-2/#description
- 1
Create a section viewport (SECTVIEWPORT)
in Vectorscript
Posted
To create a VP, call CreateVP() and use object variables to set as section:
https://developer.vectorworks.net/index.php?title=VS:CreateVP
https://developer.vectorworks.net/index.php?title=VS:Function_Reference_Appendix_G#Viewports
However, creating a section VP via VS doesn't seem possible