cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED
Level 7

## Arbortext Isodraw Macro Text edit

Hi Everybody

I need help on that one... i could not find script for editing text...

I need to remove cs text on reference inside illustration

ex:reference cs123_xyw

need to be rename 123_xyz

Thanks a lot for support!!!

Macro Delete CS
# recorded with Arbortext IsoDraw 7.3

Select if text contains 'cs'

from selection...

???delete cs???

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Arbortext Isodraw Macro Text edit

Try this script:

```Macro Remove cs
DEFINE el as Element
Select if Text contains 'cs'

IF (exists(activeDoc.firstSelectedElement)) THEN
el = activeDoc.firstSelectedElement
WHILE (exists(el))
IF (el.type="Text") THEN
el.text.string = right(el.text.string, (len(el.text.string) - 2))
END IF
el = el.nextSelectedElement
END WHILE
END IF
END MACRO```

This macro finds all text elements that contain "cs", then loops through them and removes the two leftmost characters (which should be "cs"). This should work for your purposes if "cs" is always the two characters on the left.

If "cs" could appear anywhere within the text string, you may need a different, more robust approach. Let me know, hope this helps!

Tags (7)

## Re: Arbortext Isodraw Macro Text edit

Try this script:

```Macro Remove cs
DEFINE el as Element
Select if Text contains 'cs'

IF (exists(activeDoc.firstSelectedElement)) THEN
el = activeDoc.firstSelectedElement
WHILE (exists(el))
IF (el.type="Text") THEN
el.text.string = right(el.text.string, (len(el.text.string) - 2))
END IF
el = el.nextSelectedElement
END WHILE
END IF
END MACRO```

This macro finds all text elements that contain "cs", then loops through them and removes the two leftmost characters (which should be "cs"). This should work for your purposes if "cs" is always the two characters on the left.

If "cs" could appear anywhere within the text string, you may need a different, more robust approach. Let me know, hope this helps!

Tags (7)
Announcements