Jump to content

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);

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...