cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

&model_name

bbrejcha
12-Amethyst

&model_name

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 3

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

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.

TomU
23-Emerald IV
(To:bbrejcha)

@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.

Top Tags