NX3 Grip (Object Types)
NX3 Grip (Object Types)
(OP)
Hi everyone!
Here are some issues I've come across when I was trying to create my first Grip code.
My idea was to create a .grx that will automatically put all UG objects to the layers where they should end up (datums->61, sketches->21 etc.), no matter if they are on a selectable layer at the moment or not.
And here are the questions:
1.Which object type number is assigned to the Sheet Body?
(I use MASK/ statement and don't want to make Solid Body
selectable as well-ONLY sheets)
2.When I put all the "134-SKETCH" objects to the particular
layer there is still something left. I gather that sketch
contains some more objects apart from "134-SKETCH".
What are these objects?
Thanks in advance and best regards
mateusz (matthew)
Here are some issues I've come across when I was trying to create my first Grip code.
My idea was to create a .grx that will automatically put all UG objects to the layers where they should end up (datums->61, sketches->21 etc.), no matter if they are on a selectable layer at the moment or not.
And here are the questions:
1.Which object type number is assigned to the Sheet Body?
(I use MASK/ statement and don't want to make Solid Body
selectable as well-ONLY sheets)
2.When I put all the "134-SKETCH" objects to the particular
layer there is still something left. I gather that sketch
contains some more objects apart from "134-SKETCH".
What are these objects?
Thanks in advance and best regards
mateusz (matthew)





RE: NX3 Grip (Object Types)
GRIP is a dead language and has not been enhanced since V10, except for the plotter routines in NX3. Most of the entities associated with a sketch do not show up in a layer listing, they are just there. Since Sketches are new to V10, the MASK/ may not have been fully updated to isolate all subtypes of sketch entities.
There should be a subtype mask for sheets versus solid bodies.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
Sr IS Technologist
L-3 Communications
RE: NX3 Grip (Object Types)
Not done anything with Sketches ... does using the "Member" qualifier help ?
Paul Phillips
Specialty Engineered Automation
http://www.sea4ug.com
RE: NX3 Grip (Object Types)
(valuable, althought not very optimistic
I'll spend some more hours on it and if I come up with a way to do it I'll post it.
looslib wrote:"GRIP is a dead language "
As I wrote I'm a rookie
I find it very useful to write codes that can do some sequential operations in NX for me, but if you think that Grip isn't the best way to do it, just let me know what you would advise.
(I know C but haven't been using it since university)
philipd wrote: "You may need to consider the SubType option."
How can I use the SubType number in the MASK/ statement?
And what is the "Member" qualifier help?
Thanks again and best regards
mateusz (matthew)
RE: NX3 Grip (Object Types)
See if you can get the other two working for you.
Justin Ackley
Designer
jackley@gmail.com
RE: NX3 Grip (Object Types)
Check out the EDA &SUBTYP in the online docs...
Regards,
SS
CAD should pay for itself, shouldn't it?
RE: NX3 Grip (Object Types)
Ifthen/ ((Etyp == 70) or (Etyp > 15 and Etyp < 24) or Etyp== 43) or (Etyp == 65) or (Etyp == 66)) and (Styp == 0)
Obtain/ Ents(J),Btyp
If/ Btyp == 1, &Color(Ents(J))=7 $$ Solid Body
If/ Btyp == 2, &Color(Ents(J))=6 $$ Sheet Body
Endif
Ents(J) is the array of all the selected objects. You should be able to simply replace &Color(Ents(J)) =, with &Layer(Ents(J)) =
I'd wouldn't go as far to say that GRIP is dead, more so on life support
Paul Phillips
Specialty Engineered Automation
http://www.sea4ug.com
RE: NX3 Grip (Object Types)
Maybe GRIP is in the Hospice waiting for the end to happen.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
Sr IS Technologist
L-3 Communications
RE: NX3 Grip (Object Types)
I've also checked EDA &SUBTYP but it has one value for both solids and sheets so, at first glance it seems to be useless. Since Obtain/ solves the problem I didn't check it thoroughly.
Anyway, I want to sincerely thank all of you for your support and valuable pieces of advice.
Thanks again and best regards
mateusz (matthew)
PS. here's a piece of code. Of course I'll a appreciate any comments on this (excluding criticism
CL3:
IF/resp2array(3)==0,JUMP/END:
INEXTE/WORK
MASK/70
$$
i=1
GET3:
michael_jordan(i)=NEXTE/IFEND,EOGET3:
i=i+1
JUMP/GET3:
EOGET3:
$$
j=1
PUT3:
OBTAIN/michael_jordan(j),Btype
IF/Btype==2, &LAYER(michael_jordan(j))=81
j=j+1
IF/j==i,JUMP/EOPUT3:
JUMP/PUT3:
EOPUT3: