Shorten ISODraw Macro with “For/While If/Then” functions to create a loop
I have this macro to get rid of all these duplicate callout styles from our .iso files. Not sure but would like to know why these new callouts come in when pasting elements that are not callouts. Regardless, I have this macro below and am simply trying to figure out how to shorten it with a “For/While If/Then” string function of some sort. Also below is a version of my many failed attempts. Can anyone help?
Working code but long winded:
SubMacro Clean Out Callouts WHILE (exists(activedoc.callouts["YBAEcallout"]) = true) DELETE CALLOUT_STYLE "YBAEcallout" END while WHILE (exists(activedoc.callouts["Normal-1"]) = true) DELETE CALLOUT_STYLE "Normal-1" END while WHILE (exists(activedoc.callouts["Normal-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1-1-1-1-1-1" END while WHILE (exists(activedoc.callouts["Normal-1-1-1-1-1-1-1-1-1-1-1"]) = true) DELETE CALLOUT_STYLE "Normal-1-1-1-1-1-1-1-1-1-1-1" END while End submacro
An example of one of my many failed attempts:
Macro Test Clean Out Callouts WHILE (exists(activedoc.callouts["YBAEcallout"]) = true) DELETE CALLOUT_STYLE "YBAEcallout" END while DEFINE Norm AS String DEFINE Rept AS String DEFINE Ended AS String Norm = "Normal-1" #FOR Norm = Norm TO left(Norm, 8) Rept = left(Norm, 8) Ended = Norm Rept WHILE (exists(activedoc.callouts[Ended]) = true) DELETE CALLOUT_STYLE Ended END while #End for End macro

