×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

A question about opengrip,help~

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~

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

RE: A question about opengrip,help~

(OP)
Thanks a lot!

RE: A question about opengrip,help~

(OP)
looslib,
thank you ,and can you tell me is the "name = &attvl(part,'attribute_name')" a grip program?

RE: A question about opengrip,help~

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

RE: A question about opengrip,help~

(OP)
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.

RE: A question about opengrip,help~

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources