Skip to main content
Jul 29, 2013 1:24 PM UTC
Solved

IsoDraw macro change_text_color

please can some one help.

I need to select text and change the character fill to

rbg 255

rbg 116

rbg 66

I have started with........but the color bit confuses me

macro Change_Text_Color

Select if Type is equal to "Text"

Define el as Element
el = activeDoc.firstSelectedElement
while (Exists (el) = true )

el.fill.colSpec.rgb.green = 255
el.fill.colSpec.rgb.green = 116
el.fill.colSpec.rgb.blue = 66

el = el.nextSelectedElement
end while

end macro

Dutch_MnAnswer
Jul 31, 2013 5:22 PM UTC

See if this works for you

Macro Text Color


Define i as Integer
Define tCount as Integer
Define el as Element

Select if Type is equal to 'text'

tCount = activeDoc.selectedElements

el = activeDoc.firstSelectedElement

define Mycolor as ColorSpec

Mycolor.type = "rgbValues"
Mycolor.rgb.red = 255
Mycolor.rgb.green = 116
Mycolor.rgb.blue = 66


for i = 1 to tCount

el.fill = Mycolor

el = el.nextSelectedElement

End for

Select none

End Macro

2 replies

Dutch_MnAnswer
Jul 31, 2013 5:22 PM UTC

See if this works for you

Macro Text Color


Define i as Integer
Define tCount as Integer
Define el as Element

Select if Type is equal to 'text'

tCount = activeDoc.selectedElements

el = activeDoc.firstSelectedElement

define Mycolor as ColorSpec

Mycolor.type = "rgbValues"
Mycolor.rgb.red = 255
Mycolor.rgb.green = 116
Mycolor.rgb.blue = 66


for i = 1 to tCount

el.fill = Mycolor

el = el.nextSelectedElement

End for

Select none

End Macro

swillis-2Author
Aug 1, 2013 1:02 PM UTC

Many thanks

really saved me >a lot< of time

regards