Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

grip newbie question 1

Status
Not open for further replies.

uwam2ie

Automotive
Jul 11, 2005
1,008
special grip question
is there solution if I select (mask) a solid body
to report all faces without selection all faces
... -> all faces of selected solid?
thx in ad
 
Replies continue below

Recommended for you

If you want to know the number of faces use:

Number of Edges or Faces

Synopsis:

&SOLDAT(obj,{FACE|EDGE}[,IFERR,label:])

Description:

Returns the number of edges or faces in a specified body or face.

Characteristics:

Read Only - Number - Greater Than or Equal to Zero

Parameters:

Parameter: Description

obj: The object identifier of the body.

FACE: Minor word indicating that you want to return the number of faces.

EDGE: Minor word indicating that you want to return the number of edges.

IFERR,label: Specifies a label to which program execution jumps if an error occurs. For example, an error will occur if obj is not properly defined.



John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
 
thank you John
I'm looking more for all faces of selected body to recolor
for better understanding to use...
 
the single faces of the body have attributes connected with different face colors of the selcted body...body color/face color difference.

thx in ad
 
you are right John
- from attribute to color
thank you so far
 
OK, explaination:
In toolshop is a workaround to give solid individual colors connected to material or function. Machined faces of this body have individual colors(RGB) and attributes connected to manufacturing. Coloring and attributes is managed with a grip, now , while solids created ( not only a one way process) the colors get lost but the attributes stay at the faces in most cases. For control it would be nice to select a solid, get all faces of the body recolor from face attributes. I haven't found a solution in grip cover this process, yet, at the time there is a second selection needed for ( Masking) the faces in grip. I hope its clear now.
thx in ad
 
OK, here is a VERY simple GRIP program that will cycle a part file reading attributes assigned to the faces of any bodies in the model and if it finds an attribute named 'COLOR', it will read the value of the attribute, decide which color it is designating and then change the color of that face to match the color defined by the attribute.

Note that this program is only intended as a 'demo' of what can be done but it should give you an idea of where to go next. The zip file includes the program source file, an executable and a sample NX 5 part file with a block with 5 of the 6 faces with attributes assigned that match the color names supported by the program. Just open the part and execute the program.

This should get you started on the right path.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor