×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

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

(OP)
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

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

Have you tried casting it to a displayable object?

www.nxjournaling.com

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

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

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

(OP)
Just some legacy code. Which is faster?

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

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.

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

(OP)
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.

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources