em3
07-07-2011, 09:41 PM
Hi!
I am looping through scene objects and deleting Splines. It evaluates OK if it's outside my rollout but does not work when inside the rollout.
macroScript PolyFormCADOptimizer category:"PolyFormTools"
(
--if ThePolyOptimizer.isdisplayed then (DestroyDialog ThePolyOptimizer)
Rollout ThePolyOptimizer "CAD Optimizer"
(
checkbox chk_DeleteSpline "Delete Spline"
button BTN_Optimize "Go"
button BTN_Reset "Reset"
on BTN_Optimize pressed do
(
if (chk_DeleteSpline.state) then
(
for o in objects where classOf o == SplineShape do ( delete o )
)
)
)
)
This throws the exception
This evaluates OK for o in objects where classOf o == SplineShape do ( delete o )
Is this a bug?
Thanks!
edit: It deletes the first instance but then throws an error.
I am looping through scene objects and deleting Splines. It evaluates OK if it's outside my rollout but does not work when inside the rollout.
macroScript PolyFormCADOptimizer category:"PolyFormTools"
(
--if ThePolyOptimizer.isdisplayed then (DestroyDialog ThePolyOptimizer)
Rollout ThePolyOptimizer "CAD Optimizer"
(
checkbox chk_DeleteSpline "Delete Spline"
button BTN_Optimize "Go"
button BTN_Reset "Reset"
on BTN_Optimize pressed do
(
if (chk_DeleteSpline.state) then
(
for o in objects where classOf o == SplineShape do ( delete o )
)
)
)
)
This throws the exception
This evaluates OK for o in objects where classOf o == SplineShape do ( delete o )
Is this a bug?
Thanks!
edit: It deletes the first instance but then throws an error.
