Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NXOpen curvecollector

Status
Not open for further replies.

krz177

Mechanical
Jan 11, 2015
14
Run into a problem with using the curve collector in the snap block based dialog. When prompted to select a curve and I select one, a linked composite curve appears in the part navigator of the workpart as desired. As soon as I hit OK on the dialog the linked composite curve feature disappears. I am used to the regular NXOpen builders with having to commit an object and I don't see that same functionality in the snap wrapped functions.

I hacked together a workaround that "works" but is very flawed. I basically found the composite curve feature in the tree (all within the OnOK sub) linked it to a composite curve builder, did a commit() and dispose() on the object, and like that a linked composite curve is now a feature in my part navigator.

I realize that this method is not correct and that this should work using the code below but I can't seem to get the linked composite curve feature to stay otherwise. Combed through countless documentation and still turning up empty. Any insights on what I'm missing?

Code:
curveCollector.AllowMultiple = True
curveCollector.CurveRules = 4
curveCollector.EntityType = 4
curveCollector.InterpartSelection = Snap.UI.Block.InterPartSelectionCopy.Controlled
curveCollector.CreateInterpartLink = True
Me.AddBlocks(curveCollector)

Thanks in advance
 
Replies continue below

Recommended for you

Solved my problem, looped through the selectedObjects of the curveCollector, assigned to an array of regular nxopen.objects and was able to manipulate from there for what I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor