Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

ug_setPartAttrValue - RESULT IN STRING 1

Status
Not open for further replies.

CADsicle

Mechanical
Joined
Apr 5, 2013
Messages
6
Location
US
Is it possible to use this function and have the result be a string?

I created an Expression: SUPPLIER-----if(LENGTH>5/8) "STOCK" else "STD" (DISPLAY VALUE ="STOCK")

Then I created another Expression: SUPPLIER_ATTRIBUTE-------ug_setPartAttrValue("SUPPLIERS","SUPPLIER") (DISPLAY VALUE =0)

When I checked the Properties Attribute the VALUE = SUPPLIER but I need it to say "STOCK" is there any way to get this to work? PLEASE HELP
 
I was also wondering if its possible to add the IF statement to the original moldwizard spreadsheet, I tried =if (LENGTH>5/8) "STOCK" else "STD" but that didn't work either.

Thanks for any help anyone could offer.
 
Your expressions should read like this (note the lack of "quotes" in second field of the ATTR expression):

AttributeExpressions_zps2aa7de50.png


This will result in the attribute SUPPLIERS="STOCK" being created

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.
 
Wow that was simple,

Thanks John
 
I was asked to change our spreadsheets for screws to include SUPPLIER=STD or STOCK basically telling purchasing if the component is in STOCK or not. The only issue I’m having is with the AUTO screws. As shown in the pictures I just separated the length list by line so I could call out specific screws and lengths to be STOCK or STD, but the screw no longer auto sizes and now wants to pick a screw length. This method worked for all other spread sheets except this one.
Do you know why it’s doing this or how I can fix it?

Thanks for any help anyone can offer.


Example_Problem.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top