Jump to content
Sign in to follow this  
twk

Script to Change Dimension Trailer

Recommended Posts

This script came into being because our office standard has our room names as trailers of it's dimension.

The tedious task was having to select the dimension, navigating to the trailer text box in the object info palette and changing it, then clicking out to regenerate the dimension display.

You can use this as a script or create Tool PIO to use it. I've done the latter.

Thanks to LarryO for pointing out the Resetobject Procedure

Procedure ChangeDimTrailer;

VAR

h2Dim : HANDLE;

x1,y1 : REAL;

oldTrailer, NewTrailer : STRING;

BEGIN

DSelectAll;

GetPt(x1,y1);

h2Dim:=PickObject(x1,y1);

IF h2Dim<>NIL THEN BEGIN

CASE GetTypeN(h2Dim) OF

63 : BEGIN

oldTrailer := GetObjectVariableString(h2Dim,10);

NewTrailer:=STRDIALOG('Type in the New Name for the Trailer', oldTrailer);

SetObjectVariableString(h2Dim, 10, NewTrailer);

END;

END;

END;

ResetObject(h2Dim);

END;

RUN(ChangeDimTrailer);

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

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.

×