×
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

Layer setting Journal

Layer setting Journal

Layer setting Journal

(OP)
Hi
I have to write a journel to do layer automation for harness routing(Electrical routing)
I dont have much knowledge in creating journals.
I have a scenario where,
All the routing segments should be moved to layer 230
Stocks and solid objects(connectors,terminal tags) should be moved to layer 231
Routing control points to layer 234
Ports to 236
Points to 235
CSYS to 200
Legends to 250

Please help

RE: Layer setting Journal

(OP)
I am unable to do this from long time.
Does any one know how to get this done in journal?

RE: Layer setting Journal


For Each obj As DisplayableObject In theSession.Parts.Work.Bodies

If obj.GetType.ToString = "NXOpen.Body" Then ' only check object types of body

obj.layer = 2 'This moves the object to layer 2

End if

Next

The code above would cylce through all bodies in the work part ( add the same code but change .bodies to .curves to get curves etc and move to the desired layer)

Replacing the first line with this:
For Each obj As Routing.Port In theSession.Parts.Work.RouteManager.Ports

should cycle through the routing ports (although I've not tested it). You can hopefully work out the others from there....

Mark Benson
Aerodynamic Model Designer

To a Designer, the glass was right on CAD.

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