Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Part properties

Status
Not open for further replies.

Montzi

Computer
Aug 4, 2004
2
Hello

I'm seeking a method to handle user defined UG part attribute values with UG GRIP. Has anybody done that ?
 
Replies continue below

Recommended for you

What exactly are you looking to do? Simply edit existing attributes; add, edit, and delete attributes; or something else?
 
Yes. Our drawing formats are populated and edited from a GRIP program and attributes.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
 
I'm trying to read values of those user defined partfile attributes and then write them out to text file.
 
Here is some code snipets:

Reading an attribute to a variable:
attvar = &attvl(part,'attribute_name',iferr,l00:)
Replace attribute_name with your attribute. You can use an array in a loop.

Create a text file:
create/txt,10,'text_file_name.txt',iferr,err0:

Writing a line of data to a text file:
Format mask
fmt1='#@@@@@@@@ #@@@@@@@@@@@@@@@@@ #@@@@@@@@@@@@'
write/10,using,fmt1,attr1, attr2, attr3
file/txt,10





"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
 
Hi guys

I am lokking for function to get UG part attrubutes using VB6. I tried to make C/C++ program to get attr. using API but I failed on that. I don know how tyo do that.

Can you help me pls?

Tnx

 
UG does not support VB up through NX2. NX3 may change that.

Your only methods for getting atributes out of UG are GRIP or C/C++.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
 
Thnx man

but I unfortunately I do have problem with C/C++ API functions. Code runs through UF_ATTR_ask_part_attrs_in_file function but all parameter are empty. So I dont know how to write correct code pls help me

Tnx Miro V
 
Sorry, I don't write C code.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor