×
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

NX9 Navigator Order Journal

NX9 Navigator Order Journal

NX9 Navigator Order Journal

(OP)
In July of 2014, JPETACH posted this journal to change the Navigator Order

Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim componentOrder1 As Assemblies.ComponentOrder = CType(workPart.ComponentAssembly.OrdersSet.FindObject("Chronological"), Assemblies.ComponentOrder)
componentOrder1.Activate()
End Sub
End Module


This works fine if you are in an assembly, however if you are in a single detail it errors out. I know.... why would I want to set the order in a single detail, right?

I have a set up button that most of us run to set a bunch of attribute for drafting preferences and such. We use this button for all files we work on. I would like to paste this into the set-up journal so that it will automatically set the Navigator order to Alphanumeric.

So I ask, can anyone please help me with a journal code that will set this order to assembly files and when you are in a single detail it simply gets ignored and doesnt error out?

I attached the Setup Journal I will add it to in case this will help the process.

RE: NX9 Navigator Order Journal

Looks like you should check if the assembly has any components before using OrdersSet().

You could try:

if (theNxDataController.NXPart.ComponentAssembly.RootComponent == null)
&& (theNxDataController.NXPart.ComponentAssembly.RootComponent.GetChildren().Length == 0)

Paul

Paul Turner
CAD & Process Engineer
Mastip Technology

RE: NX9 Navigator Order Journal

(OP)
Thanks for the help PaulBarryTurner, but unfortunatlely, I know extremely little about Journal Code. I have learned to look for certain types of code on a journal and copy and paste it to another to merge them, but that is even touch and go. lol

To be honest, I am not sure where to insert your code to my setup journal, as everytime I try it, it keeps giving me errors.

'IF' must end with a matching 'End If'
'theNXDataController' is not declared.
Expression Expected
'null' is not declared. 'Null' Constant is no longer supported; use 'System.DBNull' instead.
Syntax Error.


I think it would be best if you helped me as if you were teaching a child to tie his shoes. .... Though I am guessing there are no Bunny Ear tricks in Journal Code. lol

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