×
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

NX9 JOURNAL FOR MOVING OBJECTS TO LAYERS

NX9 JOURNAL FOR MOVING OBJECTS TO LAYERS

NX9 JOURNAL FOR MOVING OBJECTS TO LAYERS

(OP)
Objective = VB code for moving all Curves, Dimensions, Notes, Labels,Symbols and Groups to layer 254 (done in drafting)

Reason = File Checker insists on specific objects to be on specific layers. Too often a detailer will take a new detail and just start detailing it up, and not until they are done will they realize they forgot to set the work layer to 253 or 254 which is supposed to hold all of the drafting objects. So everything is on layer 1 (or whatever layer they had set as their work layer). If they window around everything and move to layer 254, it can also select solid bodies, sheet bodies etc... inside the views. So I would like to create a button that when selected it will automatically do a Move to Layer, and use the filters to select everything (Not in the views) to layer 254.

Note:
If I record a journal to do this and select by filters, I dont see where it shows it is selecting specific objects by filter settings. It seems to record each individual object being selected instead.

RE: NX9 JOURNAL FOR MOVING OBJECTS TO LAYERS

(OP)
Can someone please let me know if this is something that just isnt possible? All sheets are 11x17 so maybe there is a way to filter it and select by a window around the area?

If I can learn how to get just a couple different objects through the filter and select all, like Curves and Points, I am pretty sure I can fix it to find other objects like Dimensions, Notes, Labels and symbols.

I dont understand why there is so much that recording a Journal will not record. This makes it really hard for people who are amateurs to VB code to learn. Sorry if I sound frustrated. It is just that I had an easier time recording and manipulating macros than I have with VB.

RE: NX9 JOURNAL FOR MOVING OBJECTS TO LAYERS

It is possible. Most of the objects you are interested in are contained within "collections" in the part. This makes it easy to gather up all the notes, dimensions, ID symbols, etc. The last time that I worked with groups, the collection wasn't fully implemented and I had to use the .CycleObjsInPart function to find all the groups. However, that was a few releases ago, hopefully they have their own collection now.

www.nxjournaling.com

RE: NX9 JOURNAL FOR MOVING OBJECTS TO LAYERS

Recording a selection process isn't going to give you what you want, because you want an automated process that doesn't involve selection.

There is a fairly well-known set of techniques for removing selection code from journals. The best description of it is in the "Getting Started with SNAP" document. Search for "FindObject".

Using SNAP functions, what you want is easy. It's basically just something like

CODE --> VB.NET

For Each obj As Snap.NX.NXObject in workPart.Objects
   If object is a suitable type
      obj.Layer = 254
   End
End 

Using NX/Open functions will be somewhat clunkier, but not too bad.

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! Already a Member? Login


Resources

White Paper - Implementing a Multi-Domain System
IoT systems are multi-domain designs that often require AMS, Digital, RF, photonics and MEMS elements within the system. Tanner EDA provides an integrated, top-down design flow for IoT design that supports all these design domains. Learn more about key solutions that the Tanner design flow offers for successful IoT system design and verification. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close