Notifications
Clear all
[Closed] trouble with spinner and convertToSplineShape
Nov 21, 2011 7:16 pm
I apologize in advance in case I am making some incredibly obvious mistake.
The objective is to set the z value of a section object using a spinner and convert the section to a spline.
Note that if executing without using the rollout the lines for creating the section and convertToSplineShape seem to work fine.
Thanks in advance for any feedback.
rollout a "DWG Extraction Assistant" width:168 height:100
(
spinner spn1 range:[0,1000,48] type:#integer
label lbl1 "cut plane h."
button btn1 "section" width:120 height:24
on btn1 pressed do
(
s = section length:1000 width:1000 pos:[0,0,spn1.value] isSelected:on
convertToSplineShape s --this does not work
)
)
createDialog a
2 Replies
Nov 21, 2011 7:16 pm
Actually the section is being converted to a splineshape, but it is an empty one. This is because the section hasn’t had a chance to calculate the objects it is intersecting.
You need to add a ‘redrawViews()’ command after creating the section object and before converting it to a splineshape.
Nov 21, 2011 7:16 pm
Thank you lo :applause:
Is redraw required because I am using a button? I mean a spinner…