Skip to main content
1-Visitor
February 3, 2014
Question

how to truncate a drawing note field

  • February 3, 2014
  • 1 reply
  • 2857 views

hello all-

I am using parameter &dwg_name on my drawing. I need ot truncte some letters at the end of that parameter. what is the best way to go about that?

Thanks


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

1 reply

1-Visitor
February 3, 2014

Unfortunately we can't create drawing relations. But if the parameter &dwg_name exists in the part, you can create a part relation that truncates it and creates a new parameter that you can reference as the drawing name:

new_name=extract(dwg_name,1,3)

In parenthesis is the string name, the position to start extracting from, and the number of charaters to extract (including the current postion). So, in the example above, if dwg_name is ABCDEFG, new_name will become ABC.

1-Visitor
February 4, 2014

Thank you very much

so now I import a .tbl file with the parameters in. how can I modify that .tbl file to reflect the new parameter?

1-Visitor
February 4, 2014

I'll assume you are not creating a new format. Set the model with the parameter you want as the active model in the drawing (if you have more than one model) and then just reference the new parameter in the table....edit the cell that has the drawing name and enter the new parameter as so: &new_name.