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.
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.
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.
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.
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.