Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Layer setting Journal

Status
Not open for further replies.

Sri089

Aerospace
Sep 18, 2014
10
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

 
Replies continue below

Recommended for you

I am unable to do this from long time.
Does any one know how to get this done in 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor