Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

'NXOpen.UF.UFCurve.Line' cannot be converted to 'NXOpen.DisplayableObject'. D:

Status
Not open for further replies.

EngProgrammer

Aerospace
Joined
Jan 14, 2015
Messages
150
Location
US
Within NXOpen I am trying to blank and/or more a line created with

Dim line1 As NXOpen.UF.UFCurve.Line = New NXOpen.UF.UFCurve.Line
 
Sorry. Didn't finish the thread.

I am using

workPart.Layers.MoveDisplayableObjects(257, {line1})

But, NX is saying to a displayable object. What is the work around for this? Rather than instancing an NX line instead of a UFUNC line.

thanks
 
Nevermind, that won't work. NXOpen.UF.UFCurve.Line is a structure, not a class. Why the need to use UF.UFCurve.Line instead of a NXOpen.Line object?

www.nxjournaling.com
 
An NXOpen.UF.UFCurve.Line is not a Displayable object. It doesn't live in an NX part file, and it doesn't have a layer. So, obviously you can't move it to a new layer. You can't display it, either.

If you want a "regular" NX line (an object in an NX part file), you should be using an NXOpen.Line object or a Snap.NX.Line object. With these, you can display them, change layer, change color, and so on.
 
NXOpen.UF.UFCurve.Line object is displayable. It is displayed in the ug graphics window but doesn't appear in the part navigator. Also, it can be manually blanked. I don't understand why you are saying it can't be displayed. Please explain.
 
If you consult the .net ref API documentation, you will find that NXOpen.UF.UFCurve.Line is a wrapper for the UF_CURVE_line_s structure (aka UF_CURVE_line_t and UF_CURVE_line_p_t); it is NOT a line object or an equivalent reference to a line object. It is simply a structure that is used to hold some information about a line object (specifically the start and end points, saved as arrays of doubles). As a data structure, it is not a displayable object. If you need to edit the line object, you will need to get a valid reference to the line object.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top