Jump to content
Developer Wiki and Function Reference Links ×

Custom Drawing Label with Marionette


Alex Talbot

Recommended Posts

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. 

Link to comment
  • 1 month later...

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.

 


image.png.d67a5cada7f706ee69fda3e3bc804687.png
 

Edited by DomC
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...