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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Macro to change case of letters in IsoDraw 7.0

RahulKULKARNI
1-Visitor

Macro to change case of letters in IsoDraw 7.0

HI,

I am Rahul KULKARNI, working as a Design Engineer. We work on Technical Illustrations. I am using IsoDraw 7.0 to create illustrations.

I would like to know whether there is any Macro exsisting by which we can change case of text. Normally, I copy the text matter into Word and by doing ctrl+shift+A change case and then copy-paste it in IsoDraw.

Can somebody help me to create Macro. I am new to this stuff. I would really appreciate your efforts.

Thanks in advance.

Regards,

Rahul KULKARNI

ACCEPTED SOLUTION

Accepted Solutions

Hi Rahul,

have a look at this simple IML macro:

MACRO UpperCaseSelectedText

DEFINE s as String

DEFINE el as Element

IF (exists(activeDoc.firstSelectedElement)) THEN

el = activeDoc.firstSelectedElement

WHILE (exists(el))

IF (el.type="Text") THEN

s = upper(el.text.string)

el.text.string = s

END IF

el = el.nextSelectedElement

END WHILE

END IF

END MACRO

It loops all the selected text elements and changes them to upper case.

But beware, in contrast to Word is not a style change and thus cannot be reverted.

I kept this simple, so it is not drilling down into groups and changing the text elements inside.

Finally, of course this will not work for texts, which have been converted to outlines.

View solution in original post

4 REPLIES 4

Hi Rahul,

have a look at this simple IML macro:

MACRO UpperCaseSelectedText

DEFINE s as String

DEFINE el as Element

IF (exists(activeDoc.firstSelectedElement)) THEN

el = activeDoc.firstSelectedElement

WHILE (exists(el))

IF (el.type="Text") THEN

s = upper(el.text.string)

el.text.string = s

END IF

el = el.nextSelectedElement

END WHILE

END IF

END MACRO

It loops all the selected text elements and changes them to upper case.

But beware, in contrast to Word is not a style change and thus cannot be reverted.

I kept this simple, so it is not drilling down into groups and changing the text elements inside.

Finally, of course this will not work for texts, which have been converted to outlines.

Hi bgraffmann,

I am really appreciating the effort you have put to help me.

Thanks a lot. Actually this was the solution I was looking for.

Just one small glitch, as you said we cannot revert the change back.

So that has me to take back-up of file everytime I run the Macro...:)

Will work out that part...

Regards

Rahul

Rahul,

you could use a nice little feature of IsoDraw for that:

1) Export your Illustration as simple text file

2) Run your macro

3) Simply open the saved text file "on top" to restore all text elements

Regards,

Benno

Hi Benno,

Thank you for your awesome solution.

I learned many new things today.

Regards,

Rahul

Announcements

Top Tags