Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Assign numbers to the faces in solid body- Grip File

Status
Not open for further replies.

bliou

Aerospace
Oct 13, 2012
7
Hello,
Does anyone know how to write a grip file to assign numbers to a solid body in UG NX7?

Thank you,
bliou
 
Replies continue below

Recommended for you

When you say "numbers", are we talking about text being added to the model or are you simply wanting to assign names to the faces?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Hi John,
Than you for replying. Basically, i am using attribute function to assign a title and string value of each face in a solid body. This process can take hours and i was wondering if this can be done by using a grip file so i can save some time.

Thanks,
 
What sort of titles and values are you writing into these attributes which are assigned to the faces?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Also, i need to assign a color to each face. can you help?

Thanks,
 
Hi John,
For example for a hole, the title will be " hole" and the vaule will be a number.

Thanks
 
I'm afraid that GRIP has no way of knowing that the 'face' of a 'hole' actually belongs to a 'hole'. All it would see is a cylindrical face, but not much more. That being said, this probably could be done using NX Open, but I don't write programs like that, however someone out there might be willing to help you out.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
What I have done in the past for fastener holes is color the hole cylinder faces (and cbore hole faces) according to a look up table. For example the text table would have a different color for each fastener size. So what I do with a program find all the cylinder faces in each body. I then get one or two edge diameter. For the edge diameter I look up the required color and then change the cylinder face color to the required color. Does this meet your requirements?

Regarding applying attributes to the faces I would suggest that surely the only reason for doing this is to use the attributes to be used for some downstream action. If that action can be done directly then the need for using attributes becomes redundant.

Frank Swinkels
 
HI Frank,

Thank you for your response. Yes, your program will definitely fit my need. Please advise.

bliou
 
Bliou,

It is important to let me know your NX version. Also if you need it for both inch and mm parts. After I have the info I suggest that we start by using a color for a range of hole sizes. For example
0.0 > 1.0 mm color 1
1.0 > 2.0 mm color 2 etc
similarly for inch

If you have a diferent requirement or if you want to use specific colors please let me know.

Frank Swinkels
 
Hi Frank,

I am using UG NX7.5, inch parts and I agree that we start with your suggestion or we can start by assigning colors and numbers to all the faces within the part.

Thank you for your help.
 
Attached is a zip file which contains a file ColorHoleFaces.txt. Change the .tx to .vb and run it as a journal. The journal get all bodies in the work part. It then finds cbore holes and simple holes. I have used a table of typical simple holes diameters and typical cbore holes for a set of SHCS. It does require that for simple holes one face is planar and the hole is normal to this face (that is that an arc is available as the hole edge).

Anyway this is a start. Let me know what you think.

Frank Swinkels
 
 http://files.engineering.com/getfile.aspx?folder=4da2bb6a-f08f-48d2-b118-8568cfa9eafb&file=ColorHoleFaces.zip
Status
Not open for further replies.

Part and Inventory Search

Sponsor