×
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

format a string in drawing

format a string in drawing

format a string in drawing

(OP)
I have string on a drawing controlled from an attribute and want to hide the last six characters from display.(nx8). Any format controlling available?
regards

RE: format a string in drawing

I would also be very interested in that if possible

RE: format a string in drawing

If I understand your question correctly, one way is to capture the number in an expression and then use it in and attribute with the limiting number wanted showing.an example would be having the weight pulled from the part with 8 digits after the decimal but having only 2 digits after the decimal show up in the attribute on the drawing.

In the expressions I have:
Kg_weight = (MakeNumber(ug_askPartAttrValue("weight (kg)")))

Then the applied attribute is: "Insert Annotation-->Note", Relationships, "Insert Expression"
<X0.2@Kg_weight> Kg

This takes the weight of 44.7849000000000 and shows 44.78 Kg on the drawing

RE: format a string in drawing

(OP)
@sam5a1
yes and no my text attribute is a combination from date and time. I want to get rid of the time portion of the string

RE: format a string in drawing

Create a new expression and reference the date stamp attribute, for this example I'll call the new expression DateTime. Create another new expression of type "string", and for the formula enter:

CODE

subString(DateTime,1,length(DateTime)-6) 

This will return the DateTime string variable, minus the last 6 characters. Use this new expression for your note.

www.nxjournaling.com

RE: format a string in drawing

(OP)
thx cowski
maybe a way to do it, are there no formating tricks from the note editor?

RE: format a string in drawing

(OP)
The really pain is I want to use the new attribute schema Nx8 and above. In Nx 8.03 you can use the date datatype format attribute.It is this comination of date and time. Problem is cell formating in the titleblock cell doesn't work, no string formating. ??? regards

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