×
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

Reverse direction of line

Reverse direction of line

Reverse direction of line

(OP)
You can reverse the direction of non-associative curve? Or quick replace start-end point.

NX 8.5.1.3

RE: Reverse direction of line

I recently was thinking the same thing.
I do not think there is a way to reverse the curve after it has been placed down.

RE: Reverse direction of line

The only way I know of is to reselect your points. You need to select a point out in space for the start point then select switch to end point and select the old start point then switch back to start point and select the old end point.

RE: Reverse direction of line

Here is a quick journal version (for NX8 and above) of moudy1's method. I have not tested it on associative lines or sketch lines, those may cause problems. Use at your own risk...

CODE

'May 2, 2013
'reverse direction of non-associative line

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module Module1

    Sub Main()

        Dim theSession As Session = Session.GetSession()
		Dim workPart As Part = theSession.Parts.Work

        Dim myLine As Line
        If SelectALine("Select a line", myLine) = Selection.Response.Cancel Then
            Exit Sub
        End If

        myLine.SetEndpoints(myLine.EndPoint, myLine.StartPoint)

    End Sub

    Function SelectALine(ByVal prompt As String, ByRef selObj As TaggedObject) As Selection.Response

        Dim theUI As UI = UI.GetUI
        Dim title As String = "Select a line"
        Dim includeFeatures As Boolean = False
        Dim keepHighlighted As Boolean = False
        Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific
        Dim cursor As Point3d
        Dim scope As Selection.SelectionScope = Selection.SelectionScope.WorkPart
        Dim selectionMask_array(0) As Selection.MaskTriple

        With selectionMask_array(0)
            .Type = UFConstants.UF_line_type
            .Subtype = UFConstants.UF_line_normal_subtype
        End With

        Dim resp As Selection.Response = theUI.SelectionManager.SelectTaggedObject(prompt, _
         title, scope, selAction, _
         includeFeatures, keepHighlighted, selectionMask_array, _
         selobj, cursor)
        If resp = Selection.Response.ObjectSelected OrElse resp = Selection.Response.ObjectSelectedByName Then
            Return Selection.Response.Ok
        Else
            Return Selection.Response.Cancel
        End If

    End Function

    Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination

    End Function

End Module 

www.nxjournaling.com

RE: Reverse direction of line

(OP)
Thank you, working ok.

NX 8.5.1.3

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