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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Replace Linestyle Macro

jsvejkovksy
1-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.

0 REPLIES 0
Top Tags