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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

IsoDraw macro change_line_color

swillis-2
1-Visitor

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

ACCEPTED SOLUTION

Accepted Solutions
Dutch_Mn
12-Amethyst
(To:swillis-2)

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
Dutch_Mn
12-Amethyst
(To:swillis-2)

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-Visitor
(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
12-Amethyst
(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
Announcements

Top Tags