Removing Geometry Manager Properties with a Script
Posted: Thu Dec 06, 2012 11:39 pm
My stack has become "infected" with Geometry Manager information. Using the "Remove All" button in the Geometry section of the Property Inspector apparently doesn't work, so I'm trying to do it with a script:
local tCount = 0
repeat for each line thisCard in the cardNames of stack "Heimdallr"
repeat with ctrlNumber = 1 to the number of controls on card thisCard
repeat with propLine = 1 to the number of lines in the custompropertysets of control ctrlNumber of card thisCard
if line propLine of the custompropertysets of control ctrlNumber of card thisCard is "cREVGeometry" then
put " " into line propLine of the custompropertysets of control ctrlNumber of card thisCard
add 1 to tCount
end if
end repeat
end repeat
end repeat
put tCount into message
That first "put..." line (about the middle line) is the problem. I get an error saying: Chunk: can't create a variable with that name (explicitVariables?)) near "custompropertysets", char 45
If I change that line from "put..." to "answer line propLine of the custompropertysets of control ctrlNumber of card thisCard", I get no error, but of course that doesn't get the job done.
If I change that line to "delete line propLine of the custompropertysets of control ctrlNumber of card thisCard", I get this error: (Commands: missing ',') near "of", char 28
Can you help me? I'm just trying to delete all the Geometry Manager properties from my stack.
local tCount = 0
repeat for each line thisCard in the cardNames of stack "Heimdallr"
repeat with ctrlNumber = 1 to the number of controls on card thisCard
repeat with propLine = 1 to the number of lines in the custompropertysets of control ctrlNumber of card thisCard
if line propLine of the custompropertysets of control ctrlNumber of card thisCard is "cREVGeometry" then
put " " into line propLine of the custompropertysets of control ctrlNumber of card thisCard
add 1 to tCount
end if
end repeat
end repeat
end repeat
put tCount into message
That first "put..." line (about the middle line) is the problem. I get an error saying: Chunk: can't create a variable with that name (explicitVariables?)) near "custompropertysets", char 45
If I change that line from "put..." to "answer line propLine of the custompropertysets of control ctrlNumber of card thisCard", I get no error, but of course that doesn't get the job done.
If I change that line to "delete line propLine of the custompropertysets of control ctrlNumber of card thisCard", I get this error: (Commands: missing ',') near "of", char 28
Can you help me? I'm just trying to delete all the Geometry Manager properties from my stack.