MaxStudio Posted March 6, 2012 Share Posted March 6, 2012 I created a plugin object that creates a geometric shape and uses strings to display some text. Unfortunately, if I rotate the plugin object in vectorworks the text rotates as well. This creates major neck cramp issues. Is there a way for me to script the rotation of my text so when I rotate my plugin object my text adjusts itself to always displayed correctly? Thanks in advance, Derek Quote Link to comment
JBenghiat Posted March 6, 2012 Share Posted March 6, 2012 You have to rotate the text manually but it's not difficult. Use GetSymRot to get the rotation of the plug-in. Rotate the text by the opposite (negative) of the rotation value. Make sure "reset on rotate" is enabled in the plug-ins properties in the plug-in editor. Query again if you need more specific instructions. -Josh Quote Link to comment
MaxStudio Posted March 6, 2012 Author Share Posted March 6, 2012 Thanks Josh I was able to get it to work with your suggestion! Quote Link to comment
genie Posted July 6, 2012 Share Posted July 6, 2012 Hi Josh, Beginner with no experience in Vectorscript Can you explain that in layman's terms? Plug-in object = Symbol? I'm trying to make Symbols of electrical fixtures with its Fixture Types designation (text) attached to Record Format. Can I make the text rotate with the symbols? Thanks! Quote Link to comment
JBenghiat Posted August 7, 2012 Share Posted August 7, 2012 A symbol draws its geometry from its symbol definition, which is a resource. It's really analogous to a rubber stamp or tracing a template. A plug-in object gets its geometry from a script. The script can read data from the Object Info palette -- each field is called a parameter. PIOs can range from fairly simple to quite complex. In order to rotate text so it is always horizontal, you would need to make a PIO inserts a symbol, reads its own rotation, creates the text, then rotates the text in the oposite direction. There are various levels of complexity for retrieving the text value, from using a parameter field (easy) to getting a record attached to the symbol definition (slightly harder). If you're interested in creating your own plug-in with VectorScript, I recommend first looking up a basic introduction to Pascal, the language on which it is based. Note, this not the more modern Object Pascal. Next, take a look at the help application's VectorScript Language guide. Finally, take advantage of the reference materials on developer.vectorworks.net. -Josh Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.