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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

&model_name

bbrejcha
14-Alexandrite

&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
BillChapman
13-Aquamarine
(To:bbrejcha)

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.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags