Skip to main content
bbrejcha
15-Moonstone
April 25, 2019
Question

&model_name

  • April 25, 2019
  • 3 replies
  • 2890 views

I want to include the part number within a title block so it displays properly on a detail drawing.  I want to use &model_name with .PRT at the end so show the extension or .ASM if it's an assembly.  Any ideas.   I know I've seen it thru out the years. 

 

Bart Brejcha

Design-engine.com

3 replies

13-Aquamarine
April 25, 2019

We use &type in the formats.  This will give you PART, ASSEM, etc, but not prt, asm

KenFarley
21-Topaz II
April 26, 2019

So, with this bit of info, a possible solution to the original problem could be to use some relations to define a drawing parameter that is then used in the title block:

 

(1) Define a drawing parameter, let's call it "partname", with type STRING.

(2) Put in some relations to build the parameter up from the known data:

partname = &model_name
IF &type == "PART"
 partname = partname + ".prt"
ENDIF
IF &type == "ASSEM"
 partname = partname + ".asm"
ENDIF

(3) In your title block, use &partname rather than &model_name.

 

Keep in mind I'm just using the information you provided, I am not sure of the spelling of the "official" parameters and their possible settings. There might be additional &type variants I don't know, etc.

23-Emerald IV
April 26, 2019

@bbrejcha,

 

Some new repeat region parameters were added to Creo 5 that makes doing this very simple.  Follow the same concept that @KenFarley suggested, but place the relations inside a single cell repeat region on the drawing.

 

Repeat Region Parameters.PNG

 

Repeat Region Parameters 02.PNG

 

Repeat Region Parameters 03.PNG

 

Sample files are attached.