Skip to main content
1-Visitor
July 3, 2012
Solved

quickly truncate callouts in IsoDraw?

  • July 3, 2012
  • 1 reply
  • 4185 views

Have numerous callouts that have the part name and the "long version" of the part number, i.e.

WASHER

(01-030, 79-21-11)

would like to have a way to click on the callout, hit a macro or hit a button that quickly changes to the "short version" of the part number

WASHER

(01-030)

It will always be the same pattern. Find the comma, delete it and everthing after it until the paren.

have been playing with:

selecting the layer with callouts on it

making it the only visible layer

selecting only text that contains "("

exporting selection as text file

going to an outside text editor to do find&replace

importing them back into IsoDraw

Got to be a less klunky way to something so simple?

Best answer by thendricks

Just delete the two lines 'Select None' and 'Select if Type is "Text"' at the start of the macro. It will then only run on what you have selected. In regards to not working on all the text elements, I'm not sure at this point. I ran it against the sample provided and it worked on all three. Can you post what you tried it on if it is different?

1 reply

1-Visitor
July 4, 2012

Hi,

Gary,

Its very easy,

Just send one sample .iso file.

1-Visitor
July 5, 2012

attached is sample file

Bolt, Washer, and Nut

would be great if I could select a callout, hit a key or click a button and truncate it to the short form

All efforts appreciated..

12-Amethyst
July 5, 2012

Here is a macro to do what you want. It selects all text elements and then searches for a comma. If found it removes the comma and all remaining text and then applies a closing ")" at the end. Simple but effective.

Macro Text_Clean

Define E1 as Element
Define Where as Integer
Define Output as String

Select None

Select if Type is "Text"

E1 = ActiveDoc.FirstSelectedElement

While (Exists(E1) = True)

Where=Find(E1.Text.String,",",1)
If(Where <> 0)
Where=Where-1
Output=Left(E1.Text.String,Where) + ")"
E1.Text.String=Output
End If
E1=E1.nextSelectedElement

Select None

End While

End Macro