Skip to main content
1-Visitor
May 15, 2015
Question

Replace Linestyle Macro

  • May 15, 2015
  • 0 replies
  • 802 views

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.