View Full Version : trouble with spinner and convertToSplineShape

11-21-2011, 06: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

11-21-2011, 07:19 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.

11-21-2011, 07:42 PM
Thank you lo :applause:
Is redraw required because I am using a button? I mean a spinner...

CGTalk Moderation
11-21-2011, 07:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.