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

Replace Linestyle Macro

jsvejkovksy
Newbie

Replace Linestyle Macro

Hey All,

I'm trying to write a macro that will replace a custom linestyle named "17-0.6-0.6" with the "Dotted" linestyle. I keep getting errors at "G = Activedoc.Styles[i].name". Does anyone know a solution? Here's what i have so far. I'm using IsoDraw 7.1.

Define S_QTY as integer

Define i as integer

Define G as string


S_QTY = Activedoc.styleCount

For i = 16 to S_QTY

G = Activedoc.Styles[i].name

If (G = "17-0.6-0.6")

If (exists (activeDoc.Styles["Dotted"]) = false) Then

Activedoc.Styles[i].name = "Dotted"

Else

Delete Styles G "Dotted"

i = (i - 1)

End If

S_QTY = Activedoc.styleCount

End for


End Macro



Thanks in advance.

Tags (2)
Announcements