Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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.
Solved! Go to Solution.
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
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.
My forms all have a space " " after the ¶meter and then when I bring in the form I have to edit each and delete the space and the value fills in.
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
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
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
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.
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...
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: