A question about opengrip,help~
A question about opengrip,help~
(OP)
I had a problem.I am a chinese nx2 user,and I am making a progrem with opengrip.The problem is that I want to get the attributes from ug part file with the grip or api progrem,but I don't know the exactly function.Thanks for the helper!Then,I also want to know the function which can send the information from text file to the attributes in the part file.Thanks a lot.





RE: A question about opengrip,help~
There is no direct function to assign an attribute from a text file. Each attribute must be added separately using: ASATT/PART,'attribute_name','attribute_value'
You can write in the routine to read the values and then do the assignment.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
Sr IS Technologist
L-3 Communications
RE: A question about opengrip,help~
RE: A question about opengrip,help~
thank you ,and can you tell me is the "name = &attvl(part,'attribute_name')" a grip program?
RE: A question about opengrip,help~
The attvl is a GRIP command for reading a part attribute from the file.
The line basically says to read the part attribute 'attribute_name' and assign it to the variable 'name'.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
Sr IS Technologist
L-3 Communications
RE: A question about opengrip,help~
I used the ASATT/PART,'attribute_name','attribute_value' ,and then the information was written into the attribute of the part file.Thanks looslib again.
But I find that I must open the file and run the grip programme to write the information.I wonder that can I write the information without the opening file.That may be a big problem.
RE: A question about opengrip,help~
You may be able to write a GRIP batch job that would process the files to add the attribute in background.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
Sr IS Technologist
L-3 Communications