Skip to main content
1-Visitor
July 29, 2013
Solved

IsoDraw macro change_text_color

  • July 29, 2013
  • 1 reply
  • 1528 views

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

Best answer by Dutch_Mn

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

1 reply

Dutch_Mn1-VisitorAnswer
1-Visitor
July 31, 2013

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-21-VisitorAuthor
1-Visitor
August 1, 2013

Many thanks

really saved me >a lot< of time

regards