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
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
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
RE: Toggle between arrow-in vs arrow-out in drafting
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
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
RE: Toggle between arrow-in vs arrow-out in drafting
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 Modulewww.nxjournaling.com
RE: Toggle between arrow-in vs arrow-out in drafting
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
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
Thank you...
Using NX 8 and TC9.1
RE: Toggle between arrow-in vs arrow-out in drafting
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.