×
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

Toggle between arrow-in vs arrow-out in drafting
2

Toggle between arrow-in vs arrow-out in drafting

Toggle between arrow-in vs arrow-out in drafting

(OP)
I'm looking for a journal/shortcut which can toggle between arrow-in and arrow-out in drafting. Me and my colleagues find it not so easy that you need at least 3 mouseclicks before you reach the 'annotation style' and can choose the correct arrow placing. It would be nicer to have some kind of toggle function.
I have found a journal (Link) which lets you select certain objects, but I cannot find the correct code to set the LineAndArrowPreferences(). This method also is not so easy, so I was also wondering if a journal can look for already selected dimensions before the journal is executed?

Can anybody help me with this? I'm using NX75

RE: Toggle between arrow-in vs arrow-out in drafting

We've added a simple IN/OUT toggle option when editing Arrowhead style in NX 9.0.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Toggle between arrow-in vs arrow-out in drafting

(OP)
I read about that in an other thread, but that's not going to help me because we will probably stick to NX75 for a couple of years. Is there no 'work-around' for NX75?

RE: Toggle between arrow-in vs arrow-out in drafting

If you say that it's taking you "at least 3 mouseclicks" then that's about all you can do for now.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Toggle between arrow-in vs arrow-out in drafting

Martin,

While placing your dimensions, right click near the dimension. From the pop-up dialog, choose Placement (no click involved, just hover), then choose from the available options. Works for more than just arrows. I don't include the 2nd pick as a mouse click because it allows for the user to hover a moment before showing the fly-out. So a max. of 2 clicks, 3 if you're super impatient.

Refer to the attachment.

Tim Flater
NX Designer
NX 8.0.3.4
Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB

RE: Toggle between arrow-in vs arrow-out in drafting

(OP)
Ok, thanks for all replies. I already figured out the popup Xwheelguy talks about, unfortunately this is only when placing a dimension, not when I want to edit it afterwards. So I guess I'm now stuck to 3 mouseclicks :)

RE: Toggle between arrow-in vs arrow-out in drafting

2
Seems like a lot of fuss about 3 measly mouse clicks, but anyway, try the journal below.

CODE

Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF

Module Module1

    Dim theSession As Session = Session.GetSession()
    Dim theUfSession As UFSession = UFSession.GetUFSession()

    Sub Main()

        Dim selobj As NXObject
        Dim type As Integer
        Dim subtype As Integer
        Dim lw As ListingWindow = theSession.ListingWindow

        Dim theUI As UI = UI.GetUI
        Dim numsel As Integer = theUI.SelectionManager.GetNumSelectedObjects()

        'process the preselected dimensions
        If numsel > 0 Then

            For inx As Integer = 0 To numsel - 1
                selobj = theUI.SelectionManager.GetSelectedObject(inx)

                theUfSession.Obj.AskTypeAndSubtype(selobj.Tag, type, subtype)

                If type = UFConstants.UF_dimension_type Then

                    Dim theDim As Annotations.Dimension
                    theDim = DirectCast(selobj, Annotations.Dimension)

                    ToggleDimArrows(theDim)

                End If

            Next

        Else
            'prompt to select dimensions

            Dim myDims As New List(Of Annotations.Dimension)
            If SelectDimensions("Select Dimensions to toggle arrows", myDims) = Selection.Response.Cancel Then
                Return
            End If

            For Each tempDim As Annotations.Dimension In myDims
                ToggleDimArrows(tempDim)
            Next

        End If

    End Sub

    Sub ToggleDimArrows(ByVal theDim As Annotations.Dimension)

        Dim markId1 As Session.UndoMarkId
        markId1 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "toggle arrows")

        Dim dimensionPreferences1 As Annotations.DimensionPreferences
        dimensionPreferences1 = theDim.GetDimensionPreferences()

        If dimensionPreferences1.TextPlacement = Annotations.TextPlacement.ManualArrowsIn Then
            dimensionPreferences1.TextPlacement = Annotations.TextPlacement.ManualArrowsOut
        ElseIf dimensionPreferences1.TextPlacement = Annotations.TextPlacement.ManualArrowsOut Then
            dimensionPreferences1.TextPlacement = Annotations.TextPlacement.ManualArrowsIn

        End If

        theDim.SetDimensionPreferences(dimensionPreferences1)

        dimensionPreferences1.Dispose()

        Dim nErrs1 As Integer
        nErrs1 = theSession.UpdateManager.DoUpdate(markId1)

    End Sub

    Function SelectDimensions(ByVal prompt As String, ByRef someDims As List(Of Annotations.Dimension)) As Selection.Response

        Dim selObj() As NXObject
        Dim theUI As UI = UI.GetUI
        Dim title As String = "Select dimensions"
        Dim includeFeatures As Boolean = False
        Dim keepHighlighted As Boolean = False
        Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific
        Dim scope As Selection.SelectionScope = Selection.SelectionScope.WorkPart
        Dim selectionMask_array(0) As Selection.MaskTriple

        With selectionMask_array(0)
            .Type = UFConstants.UF_dimension_type
            .Subtype = UFConstants.UF_all_subtype
        End With

        Dim resp As Selection.Response = theUI.SelectionManager.SelectObjects(prompt, _
         title, scope, selAction, _
         includeFeatures, keepHighlighted, selectionMask_array, _
         selobj)
        If resp = Selection.Response.Ok Then
            For Each temp As Annotations.Dimension In selObj
                someDims.Add(temp)
            Next
            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

        '----Other unload options-------
        'Unloads the image immediately after execution within NX
        'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately

        'Unloads the image explicitly, via an unload dialog
        'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly
        '-------------------------------

    End Function

End Module 

www.nxjournaling.com

RE: Toggle between arrow-in vs arrow-out in drafting

For what it is worth in I-Deas it was just a simple "O" keyboard stroke. Really Really quick. Nice enhancement in NX 9. Thanks

It just not about three mouse clicks. It is the couple second hesitation before the "style" box comes up. There is a for sure a delay between clicking the style and the dialogue box showing up so we can change these settings.

Once again nice Enhancement. Sometimes it is these little enhancements that could drastically increase productivity.

Also Thanks for that script Cowski Will be used a lot.

RE: Toggle between arrow-in vs arrow-out in drafting

In NX 9.0, you just double-click the arrowhead.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Toggle between arrow-in vs arrow-out in drafting

Hi John, I've tried in NX9 the double-click the arrowhead, but doesn't invert the direction.

Thank you...

Using NX 8 and TC9.1

RE: Toggle between arrow-in vs arrow-out in drafting

Double-clicking does not automatically invert the direction. It DOES however activate a so-called 'hot-spot' at the arrowhead which when you place your cursor over it, a widget will appear that then allows you to invert the arrownhead.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

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