Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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???
Solved! Go to Solution.
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!
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!