Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

A question about opengrip,help~ 1

Status
Not open for further replies.

Gabrielwang

Industrial
Jul 25, 2006
10
CN
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.
 
Replies continue below

Recommended for you

name = &attvl(part,'attribute_name')

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
 
looslib,
thank you ,and can you tell me is the "name = &attvl(part,'attribute_name')" a grip program?
 
No
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
 
Today,I successed.
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.
 
No you cannot because the data is stored in the file. You must open a file in order to modify it.
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor