Alex Talbot Posted November 19, 2021 Share Posted November 19, 2021 Once again I'm diving into using marionette tools to speed up my drawing process. I'm looking to build a marionette sequence that can build drawing labels as opposed to using the stock drawing label. Optimally I'd like the tool to be able to: -Pull the drawing title from the viewport -Pull the current view (Top/Front/Side etc) from the Viewport -Pull the scale from the viewport -Fill in the drawing # in the OIP -Place and rotate an arrow symbol indicating the upstage direction Has anyone tackled something like this before? It doesn't seem immediately easy to build something like this with the stock marionette toolset. Quote Link to comment
DomC Posted December 27, 2021 Share Posted December 27, 2021 (edited) Hi I think this can be made by scripts and/or a Marionette Nodes. I think with getRecordField and with getObjectVariable you can pull the requested values out of a viewport, if you know their IDs. The Advantage of a Standard Label or Data Tag is, that it has a perfect Link to the viewport and a User Interface to link/delink to an object. This could be made with tricks for sure with a Marionette but without a good UI and with supporting scripts etc. So I recommend to try to make your object with the DataTag. Which I think this is all makable with the DataTag except the "arrow symbol" maybe. As Example the Viewport Scale you can pull out with the following formula in a Data-Tag: Scale: 1:#WS_ObjectData('Object Variable', 1003)# Source:https://developer.vectorworks.net/index.php/Worksheet_Functions Some of the Object Variable of a Viewport (You can see them with the Methodes mentioned above): Quote SetObjectVariableReal (viewportHandle,1003,20); SetObjectVariableInt (viewportHandle,1000,6); SetObjectVariableInt (viewportHandle,1001,0); SetObjectVariableReal (viewportHandle,1002,9.76); SetObjectVariableBoolean (viewportHandle,1005,TRUE); SetObjectVariableLongInt (viewportHandle,1006,0); The Rest you can get from the Data-Tag Standard Variables. The Method to find Object Variables is the Script Reference or exporting a Drawing with one viewport as a text Format and search the Viewport's "SetObjectVariables". Change one value of the viewport and export again and see, what changes. Or you can use the "SearchObjectVariable" Marionette. Must be here in the forum but can't find it right know. The Data-Tag is a very powerful Drawing label. Only disadvantage is missing links between VP and Labels and no Links in Exported PDFs. Edited December 27, 2021 by DomC Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted December 28, 2021 Vectorworks, Inc Employee Share Posted December 28, 2021 Here is a Datatag which uses the tagged geometry's object data to draw a hexagonal label around the text. I made this to get the label to adjust to the text without distortion. You might be able to adapt this. Tag Door-IT4.vwx 1 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.