Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

GRIP to export all objects in layers

Status
Not open for further replies.

hegdedin

Automotive
Sep 23, 2007
16
0
0
IN
Hello all,

I have many objects in many layers and I want to export all the objects in a specific layer as a new part using GRIP.Is it possible?

I wrote a GRIP from which selected objects are exported to files with the filenames defined by some attribute values and layer number.But I could not find a way select everything in the specific layer and export.


It will be great helpful if somebody show me some light on this!

thanks in advance
DineshNX6.0.2.8
 
Replies continue below

Recommended for you

Well of course it isn't perpendicular there was no reason given to assume that it would be. However if you simply thicken the faces based upon the original then you do get perpendicular faces. The downside would be those necessarily nasty looking conditions in the corners where the faces cannot be continuous.

Best Regards

Hudson

www.jamb.com.au

Nil Desperandum illegitimi non carborundum
 
 http://files.engineering.com/getfile.aspx?folder=36bf1b63-c5d5-4789-936b-8df4f61deab1&file=shellst_x_t.prt
Do you want to do just one layer, each layer one after the other, or layers according to defined categories. Any of the above might be possible using grip, but the first option you could do with a macro! Also be aware that if there are dependencies between object on different layers you will carry those objects with their children unless you conspire somehow to deliberately remove parameters.

Best Regards

Hudson

www.jamb.com.au

Nil Desperandum illegitimi non carborundum
 
thanks Hudson for the quick response.
yes, I want to do each layer one after the other and there are no categories defined and parametrs of the objects are removed.
Also I want to take the file names ( one stores the file location to be created) from two of my attributes and the layer number. This is the program I wrote

ENTITY/OBJ(25)
STRING/val(132),FIL(132)
STRING/PATH(132),STR(50)
NUMBER/RESP
NUMBER/LAYNUM


FIL=&ATTVL(PART,'PROJECT',5)
IDENT/'Select Objects to Archive',OBJ,RESP
val=&ATTVL(PART,'File',5)

LAYNUM=&LAYER(OBJ(1))
STR=ISTR(LAYNUM)
PATH=val+FIL+STR
IF/RESP==3,$
CPATT/PATH,OBJ
HALT

this asks me to select objects. Is there anyway I can do a 'select all' like a macro?

thanks in advance
Dinesh
NX6.0.2.8
 
sorry for not being very clear.

I do not want to select anything. I want to just click a command and it should take care of making all the files in the layers.It should change the layers and select the objects in them and export as files .

if I have 5 objects in 10 layers I need 10 files with each file having those 5 objects.
Another input I want to give is any layer will not have more than 10 objects.

thanks in advance
Dinesh
NX6.0.2.8
 
What you need to do is cycle through the part file, checking each object for it's layer status and then doing what ever it is that you need to do. Look at the INEXTE and NEXTE commands.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.
Back
Top