Using a Journal to organize the file
Using a Journal to organize the file
(OP)
Using NX6...
I am attempting to write a journal that will organize my file, mainly to place things on different layers so that the file conforms to our standards.
To start, I thought I would tackle moving each sketch to it's own unique layer. I was able to do this, but I discovered that it is looking at each layer in the order that they were created, NOT in the order that they are in the model tree, which is what I prefer.
Any ideas?
I am attempting to write a journal that will organize my file, mainly to place things on different layers so that the file conforms to our standards.
To start, I thought I would tackle moving each sketch to it's own unique layer. I was able to do this, but I discovered that it is looking at each layer in the order that they were created, NOT in the order that they are in the model tree, which is what I prefer.
Any ideas?
Chris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6





RE: Using a Journal to organize the file
ummm, what?
I assume you meant "each sketch in the order they were created" but even so, to see how that is relevant you'll need to give more information.
Why must the sketches be presented in timestamp order, is the user verifying each one (interactively while the journal is running)? What layer(s) do you want the sketches on?
www.nxjournaling.com
RE: Using a Journal to organize the file
Yes, I meant "each sketch ..." It's been a long week
I suppose I was a little vague in my original post, so hear is some more details.
Our standards state following:
That each sketch must be on thier own unique layer.
The layers we have reserved are 101-200.
As you progress down the model tree, the layers that each sketch is on should not jump around.
My end goal for this program is for the program to find each sketch, in timestamp order, and place them on thier own unique layer; starting with layer 101, without any user interaction.
The code I have written so far works great except for two intances:
1) If the sketches have been re-ordered in the model tree.
2) If the user makes a feature the current feature, creates a new sketch; and then continues on from there.
In both of those instances (which happen alot), the creation timestamp is different than the timestamp of the model tree, and that is my issue.
Having said all of that, I do feel that our stanards are a little overkill...but since I have bigger issues to deal with I would love to find a way to make it as painless as possible!
Chris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6
RE: Using a Journal to organize the file
CODE --> VB
Option Strict Off Imports System Imports NXOpen Module organize_file Dim s As Session = Session.GetSession() Dim workPart As Part = S.Parts.Work Dim dispPart As Part = s.Parts.Display Dim lw As ListingWindow = s.ListingWindow Dim i As Integer Dim objArray(0) As DisplayableObject Sub Main() i = 100 For Each sk As Sketch In s.Parts.Work.Sketches i = i + 1 objArray(0) = sk workpart.Layers.MoveDisplayableObjects(i, objArray) Next End Sub End ModuleChris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6
RE: Using a Journal to organize the file
CODE
www.nxjournaling.com
RE: Using a Journal to organize the file
Chris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6
RE: Using a Journal to organize the file
As a comparison our standard is to have all sketches for a specific part feature on a separate layer. For example all the sketches for the mounting tabs are on layer 29. We contain all the sketches in the 20-29 range. As another example, the main body of our parts are made up of a group of extruded features, with the sketches on layer 21 and a group of revolved features, with the sketches on layer 20.
I am always interested in how others organize their parts, and what benefits they get from the organization.
I am a big proponent of establishing standards based on principles not specifics. I am continually fighting with my companies organizational groups that come up with standards 6000 miles away having never asked how we do business here in our office where we have been doing business for 30 years establishing standards what work for our products. I am in favor of the ISO/TSO style of standardizing process where the directive is that you must look at what you do and define that as your standard, and then tweek it as needed.
Nice rant huh!