Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Truncate an Attribute in a Title Block 1

Status
Not open for further replies.

cobusvs

Mechanical
Feb 9, 2012
2
Hi All,

I've gone through the forums with various search keywords and as well as Google searches (Eng-Tips still comes up top [bigsmile]) and I've learned quite a bit of very useful info from a lot of threads, but can't find a similar post.

Our company runs NX7.5.4.4 with Teamcenter 8.3.3. We're looking at automating drawing title blocks with attribute information from Teamcenter. For material finishes on Teamcenter we have a two digit code, hyphen and descriptive text, e.g. "00 - NATURAL".

The question is how do you truncate an attribute value in a title block to only show the first two digits? E.g. only show "00" in the finish of the drawing, instead of "00 - NATURAL"? Or to specify to only show specific characters from an attribute, e.g. 1 and 2; or even characters 6 to 12 if we wanted to show "NATURAL".

A particular attribute hasn't been defined yet, but I assume it will be a custom one instead of a built in one (haven't seen finish attributes yet). I've played around with a custom attribute MATERIAL_FINISH ("MATERIAL_FINISH"=(string)"00 - NATURAL"), and tried variations of <W@MATERIAL_FINISH<1,2>>, <W@MATERIAL_FINISH(1,2)>, <W@MATERIAL_FINISH,1,2>, etc. but all come up with errors.

Can it be done?

Any help would be great, thanks!

Cobus
 
Replies continue below

Recommended for you

Create a string expression and set the formula to:
Code:
subString( ug_askPartAttrValue( "[i][your finish attribute title][/i]" ), 2, 3 )

Now reference this expression in your title block note.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor