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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Creating a note that fills in model parameters automatically

jkordas
7-Bedrock

Creating a note that fills in model parameters automatically

I have a drawing format that I am creating. I have it all set to go but when I add it to a drawing, the only way to get the text to fill in is to add "&" to the text in the pulldown. How do I get the "&" to be included in the symbol so I don't have to add it all the time? Thanks.

parameters.JPG

ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:jkordas)

Jef,

Several recommendations.

1.) Use tables for dynamic information (like parameters read from the model.) They are designed for this and will automatically populate when different formats are applied to the same drawing or a new drawing is created from a template.

2.) Use symbols for static information that will never change. Borders, zones, logos, etc.

3.) Use the built in drawing system parameter &model_name in a table to display the name of the model. (There is no need to create this in the model relations.) Also, this parameter will never point to the drawing, even if no model is present.

4.) To reference parameters from the model, but not have the drawing replace them with "dead text" if they're missing or use the drawing's value instead, create single cell repeat regions that only display that one value. Set the repeat region parameter to &mdl.param.value and the repeat region filter to &mdl.param.name == <PARAMETER_NAME>. Since there will only be one parameter in that one model with that name, the repeat region will never grow. This is a very robust way to reference model parameters.

Finally, here is a link to the most recent System Parameters for Drawings

View solution in original post

13 REPLIES 13

I've tried to get this in the past and couldn't get it to work.

I ended up making fields in the format with the variable instead by adding additional tables in strategic locations.

I hope there is a better answer to this as well.

In theory, a format can be a symbol rather than a table if this were possible.

That would provide significantly more freedom in format creation.

Dale_Rosema
23-Emerald III
(To:TomD.inPDX)

My forms all have a space " " after the &parameter and then when I bring in the form I have to edit each and delete the space and the value fills in.

kpritchard
12-Amethyst
(To:jkordas)

My thinking is the problem is that you are defining a variable (parameter) as a variable. I would try entering the parameter as static text rather than as variable text.

After first response I noticed that it looks like you are creating a Symbol to act as your Drawing Title Block... For Title Blocks I suggest creating a Table in your Format and using parameters directly in the Table cells.

What I'm trying to do is have the "&model_name" be driven by the model parameters. So regardless of what part I assign it to, it will update accordingly. I've had success with it in the past, but since switching to Creo, I can't get it to work.

FYI... This is a known issue with Creo. https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS125598

PTC says "Templates were never intended to have the capability of avoiding calling out a parameter that exists in the drawing so they can get it from the solid when/if the solid shows up. (please note that template functionality was designed before there were these automatic parameters.)"

I filed a request to have this functionality "restored"

The link above contains a "work around" or you can create the templates in Wildfire 4.0 or older.

This may also be helpful...

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS38436

kpritchard
12-Amethyst
(To:jkordas)

I have a format that pulls model parameters for name (&PART_NAME), Number, Revision (&PTC_WM_REVISION), weight (&pro_mp_mass) and so on, directly into the Drawing Title Block as a table in the format. It does require creating the drawing from the part... I've never tried it as an empty drawing and adding the part later - I suspect that would kack.

That is the workaround we are using as well.

Jef,

add the following relation into all models.

model_name=rel_model_name

This relations creates parameter model_name containing real model name.

Then you can put &model_name into format table cell.

Martin Hanak


Martin Hanák
TomU
23-Emerald IV
(To:jkordas)

Jef,

Several recommendations.

1.) Use tables for dynamic information (like parameters read from the model.) They are designed for this and will automatically populate when different formats are applied to the same drawing or a new drawing is created from a template.

2.) Use symbols for static information that will never change. Borders, zones, logos, etc.

3.) Use the built in drawing system parameter &model_name in a table to display the name of the model. (There is no need to create this in the model relations.) Also, this parameter will never point to the drawing, even if no model is present.

4.) To reference parameters from the model, but not have the drawing replace them with "dead text" if they're missing or use the drawing's value instead, create single cell repeat regions that only display that one value. Set the repeat region parameter to &mdl.param.value and the repeat region filter to &mdl.param.name == <PARAMETER_NAME>. Since there will only be one parameter in that one model with that name, the repeat region will never grow. This is a very robust way to reference model parameters.

Finally, here is a link to the most recent System Parameters for Drawings

Hugo-KTM
13-Aquamarine
(To:TomU)

Hi,

Is there a way to do string operations on those parameters i. e. concatenate (+) and extract().

I want a string in the drawing like this:

 NUM_MARK = rel_model_name() + "_" + PTC_WM_REVISION + "_" + extract(RELEASE, 1, 1) + "_<88>"

Creating that string in the model does not work for us since the release parameter is updated on the drawing model in Windchill and the models are not regenerated when creating drawings via Creo View Adapters.

A drawing program might not work since a PTC support article (CS38436)  mentions that you need to know if the drawing model is a part or an assembly beforehand.

TomU
23-Emerald IV
(To:Hugo-KTM)

This is a pretty old thread.  Probably would have been better to start a new one, but let's see if we can figure this out.

 

First, what are you trying to do with this constructed string parameter?  Do you want to display it somewhere on the drawing?

 

Second, it is possible to regenerate just the drawing during publishing.  It's a setting in the CAD working recipe file.  Not saying you should do this, just saying it's possible...

Hugo-KTM
13-Aquamarine
(To:TomU)

Hi, Thank you for your reply.

 

Yes, I want to display it on the drawing.

 

I figured out the limitations of drawing programs and got it to do what I want, but then I had to switch to a drawing table with repeat regions.

 

Thank you for your comments.

 

For future readers:

The limitations i found out are:

  1. Max. line length in drawing programs is 78 characters or so.
  2. The order of the lines was somehow important.
  3. I think I had to create some of the parameters first.
  4. Coworkers might object to drawing programs.
Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags