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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

IsoDraw macro change_line_color

swillis-2
1-Newbie

IsoDraw macro change_line_color

I need to change the color of a pen to....

Define Mycolor as ColorSpec

Mycolor.type = "rgbValues"

Mycolor.rgb.red = 255

Mycolor.rgb.green = 116

Mycolor.rgb.blue = 66

I found this......

activeDoc.pens["Thick"].color.type = "colorRef"

activeDoc.pens["Thick"].color.color = "Mycolor"

activeDoc.pens["Thick"].color.tone = 1

...but I'm confused about the syntax

any help most appreciated

1 ACCEPTED SOLUTION

Accepted Solutions

Try this

Macro pencolor


activeDoc.pens["Thick"].color.type = "rgbValues"
activeDoc.pens["Thick"].color.RGB = "{RGB 255 116 66}"

End Macro

View solution in original post

4 REPLIES 4

Try this

Macro pencolor


activeDoc.pens["Thick"].color.type = "rgbValues"
activeDoc.pens["Thick"].color.RGB = "{RGB 255 116 66}"

End Macro

yes......many thanks ....again

That has worked well!!

twade
1-Newbie
(To:Dutch_Mn)

This macro works great if you always know the pen name, but is there a way to make it search all pens and change there color reguardless of the name?

BLArts
8-Gravel
(To:twade)

This may help. This makes all pens that have names that start with 0 have a black color.

 

Macro Make Pens Black
DEFINE p AS Integer
	DEFINE i AS Integer
	DEFINE BkCr AS String
	Select None
	i = ActiveDoc.PenCount
	p = 1
#Starts loop that goes through all existing pens.
		While ((p <> i + 1) = True)
		If (Left(ActiveDoc.Pens[p].Name, 1) = "0") then
	BkCr = ActiveDoc.Pens[p].Name
	activeDoc.pens[BkCr].color.type = "colorRef"
	activeDoc.pens[BkCr].color.color = "Black"
	activeDoc.pens[BkCr].color.tone = 1
	p = p + 1
		Else
	p = p + 1
		End if
		End While
End macro
Top Tags