Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

GRIP & Creating a Layer List

Status
Not open for further replies.

Pondering

Aerospace
May 25, 2006
23
Does anyone know of a simple way to get NX (using GRIP) to export a layer list which contains a object count for each layer to a scratch file!

Thanks in Advance

Pondering...
 
Replies continue below

Recommended for you

Pondering,
Coming up with a grip to spit out a layer list isn't a challenge. However, some more info would be helpful so that we have a better idea as to why you need this information, what will be done with it, etc.
If your folks don't follow strict layering conventions and if standards aren't enforced, this info would have limited uses... but coming up with a routine that would spit out a total entity count for each layer, along with whatever layering category it belongs to, should be fairly easy.

SS

Regards,
SS
CAD should pay for itself, shouldn't it?
 
Greetings Shadowspawn,

You have almost hit the nail on the head with standards, I have a large number of drawing part files created using a 'MODEL' reference set, prior to a change in our Teamcenter Workflows configuration, which automatically generates CGM's based upon the ENTIRE PART reference set, so creates rubbish 'automatically' if a drawing has been defined using the MODEL reference set.

I am using GRIP to generate a visible in View layering mask. The programme will (hopefully)

Get all of the view names with the database, strip out the '@' symbol from the views names and replace it with '-'.

These revised view names will then be used to define layer categories. (hence having to remove the special character from the name)

Once that is created. I want to remove the category name from any layers which don’t have geometry,

Then I can make visible in the views, by the category name.

I currently have all of this working.............Except............ getting a layer list which has object count on it.

I know it should be simple, but my brain has gone blank...

Any help / guidance are much appreciated.

Cheers,

Prondering


 
Pondering,
Ahh... if I understand you correctly, you want to take an existing part file and:
1. create a visible in view layering mask for each saved view **So are we talking model or drawing views, or both?**
2. define layering categories based off the saved view name **are you deleting the existing layering categories or keeping them?**
3. cycle through the layers and if the entity count is zero, remove that layer from whatever layer category includes that layer
Does this sound about right?
I can see (read imagine in my mind's blind eye) several approaches to do this, but a better idea of how your code is structured would help (unless you wanted to make this a subroutine...).

Regards,
SS
CAD should pay for itself, shouldn't it?
 
You seem to have a fair idea of what I am trying to do………

1. Yes, I intend to have a different layer mask for each view in the drawing, not worried about the model layouts
2. Yes, I intend to create a category name based upon the view name, i.e. view FRONT@1 will be category FRONT-1 (the ‘@’ symbol is not valid in a category name)
3. I shall then push the layers currently visible in the view(s) into the relevant categories. I shall then delete the categories from any layers which contain no entities.

The basic structure I have thus far is:-

1. Scan the views & create layer categories based upon their name.
2. Delete categories from any layers which contain no geometry. (the Bit I cant get my head around at the moment)
3. Use ‘Visible in view’ to remove all of the geometry from the views.
4. Then, use ‘Visible in view’ again to display the layers defined by the relevant categories into the various views, i.e. layers in category FRONT-1 will be displayed in view FRONT@1 and so on.

Obviously the usual error checking (active part, etc……) is included.
It is my current intention to have a single programme and not use any subroutines as I only intend to use this programme myself (not for general user use as would encourage them to not follow the procedures)

I anticipate that most of the drawings should be able to be fixed doing this, leaving the odd few to be manually done, (They will all have to visually checked prior to being released anyway)

The whole process works manually, it’s just the layer ‘stripping’ bit I can’t seem to get to work.

Any help, advice or guidance is always appreciated.

Cheers in advance,

Pondering…………………..
 
Pondering,
Just curious; how are you dealing with views containing a specific view mask or a non-standard view mask? How are you dealing with existing layering categories? Ignoring them?
Concerning #2 above: (1)don't look at it as deleting a category name from a layer... look at it as deleting a layer from a category (2)or as not assigning a layer to a category if the entity count<=0 (3) or even as having two separate grips: one to interrogate the part, assign an attribute, and write any existing data to file(s) and the other grip to check for the attribute to proceed, close and reopen the partfile so its in its virgin state, manipulate the partfile, and if successful then remove the attribute.
You kind of have me curious now...

Regards,
SS
CAD should pay for itself, shouldn't it?
 
I haven got the problem of there being any existing view masks due to method which has been used to define the views. The method which has been used is to put everything which needs to be detailed into the ‘MODEL’ reference set. Then in the specification (drawing) the Model reference set is used when viewing the master model. Therefore the views effectively have all layers visible which is not how we do things.

I take your point about tackling the issue of categories and empty layers from another angle. Perhaps some brain fuel (beer) over the weekend will help.

Cheers,

Pondering……………
 
mmmmm....beer! Since I'm sitting on the ground this weekend nursing a pulled tendon thingy, I'm sure I'll have my fair share of nourishments. :-D
On a serious *yeah right* note, how do the detailers mask out entities they don't want to show? in a detail part? in an assembly? Do they view-dependently erase what they don't want to see? ...edit the vis-n-view mask? ...blank objects? ...is everyone pretty consistant as to which method or could it be anything?


Regards,
SS
CAD should pay for itself, shouldn't it?
 
If that is all that you want, just go to Format/Layer Setting... and push the button labeled "Information". Once you have the listing window open with the layer and object information, just go to the File menu at the top of the listing window and do a "Save-As".


John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
Phone: 714-952-6032
FAX: 714-952-5758
John.R.Baker@ugs.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor