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 PTC Community Badges. Engage with PTC and see how many you can earn! X

VARIABLE TEXT IN CUSTOM SYMBOL

cspinelli
14-Alexandrite

VARIABLE TEXT IN CUSTOM SYMBOL

Hello,

i have a question about custom symbol. is it possible to have a single variable text repeated?

for instance, i have to use a text in both italian and english language but i have to use the same variable text

ex. ZINC PLATE \ZINC\ AND ZINCATURA \ZINC\

Thanks!

ACCEPTED SOLUTION

Accepted Solutions
BrianMartin
12-Amethyst
(To:TomU)

Hi Tom...

I just did the same test and had no problems whatsoever.

  1. Created a new drawing with NO MODEL, no template, no format. This is a completely empty drawing with no parameters
  2. Created one single drawing parameter called myparam set as a string with the characters "XXX" as the value.
  3. Created a brand new symbol, added a circle (just so it had some shape to it) and a note. For the note, I entered "\my_text\".
  4. Under attributes for the symbol, I specified a free point as the location.
  5. Under the Var Text tab, I replaced the preset value of my_text with the string "&myparam".
  6. Saved and exited the symbol creator.
  7. Placed the new symbol on my drawing... and it shows up as a circle with "XXX" in the middle of it.

Here's the symbol in the symbol editor...

final1.PNG

Here's the symbol on the sheet...

final2.PNG

Here's the entire set of Drawing Parameters...

final3.PNG

This is Creo 2.0 M080 which, I think we all can agree, is a terrible build code to use... but this is what I used for this demo.

Thanks!

-Brian

View solution in original post

27 REPLIES 27
Patriot_1776
22-Sapphire II
(To:cspinelli)

Try it and see, the best way to learn

Hello,

I have the same question, I tried a lot of time and I found no solution.

I opened a call, I give you the answer if I have one!

You can type whatever you want if you use this syntax in a symbol definition

Define the symbol and add \ in front and back of the note

For example

\Zinc\

When you place the symbol in the drawing you ll see only Zinc.

But you can edit these how much time you want in the drawing and you can place it how much times you want

Hope i gave what you need!

If not please more specific what you need

I give you an example of symbol below.

The first line is in Portuguese and the second in English but "codigo" has to be the same value (1 attribute)attribute.jpg

In symbol definition I wrote :

attribute2.jpg

But in that case I have to enter a value for each attribute and potentially I will have a different value.

Thanks for your answers.

I dunno whether this is the answer but lets try

you can use parameters right? parameters in dwg

only thing is to you have to designate it and you are good to go... you can use it wherever you want... just one time edit you ll get the value changed wherever you want

Untitled.png

thats all... you ll have to use this parameter in the note wherever you want like this

&PARAMETER_1

Applying it to your case

DEMAIS DIM. VER PECA ESPELHADA: &PARAMETER_1

FOR MORE DIM. SEE MIRROR PA RT: &PARAMETER_1

Hope this solves..

It helps for single drawings,

Thank you,

dschenken
21-Topaz I
(To:vrajan)

That doesn't look like an answer to the question about a custom symbol. It does apply to a drawing note. I don't think it is required to designate the parameter as designating is a function for Windchill to see the parameter when it is checked in. If the parameter is not already managed in Windchill it generates an error message, but otherwise succeeds.

Unless symbol functions have changed, they don't allow repeated text variables. It would have to be \zinc1\ and \zinc2\.

It may be possible to assign the same parameter to each symbol variable.

Marked the post as answered considering the reply from Vincent and assuming that it was resolved. Removing Answered. My mistake, overlooked that post was from Christian not from Vincent.

Christian,

When creating a symbol you can add parameter (&parameter_name) as variable value for variable text to call the value of parameter from part. This will call the value of parameter from part in symbol e.g. if parameter in part is material with value as zinc, symbol will call zinc from part parameter.

If you will define the variable text in symbol without parameter, it will independent for both of the in symbol for input.

Hello

I opened a call by PTC and that's the answer :

Désolé, je dois vous communiquer que cette fonctionnalité n’existe pas en Creo Parametric

In English : Sorry, I have to answer that this fonctionality is not existing in CREO Parametric.

Hi Vincent...

This is not an answer, is it? "Sorry, I have to answer that this functionality is not existing in CREO Parametric." Of course not!


There's no way to make this point without sounding snarky. I've been trying for 10 minutes already. So I'm just going to go ahead and be honest. With the utmost respect, most PTC Technical Support personnel are not experts in Creo software. At best, they are well-trained technicians who search for your problem in a large database. If they're any good, they might even recall some nuances of the software which make it easier for them to perform the same search later. However, when they hit a wall that says "Creo cannot perform this function", they stop.


There are exceptionally few tech support specialists who understand the software to a depth where they will fight for a solution to your problem. If the mighty database says it can't be done, then it can't be done. Period. My favorite thing about PTC Community is solving the unsolvable. Few things give me as much pleasure as posting an answer to a problem PTC deemed impossible.


Here's what you need to do - utilize rarely used features intended for cabling inside of SYMBOLS to solve your problem. Various people have suggested parameters (drawing parameters, model parameters, etc). Someone else mentioned it might be possible to use multiple pieces of variable text but that this will require changing each piece of text individually. There's actually a better way!


Inside Symbols you can set Parameters. These were intended to support cabling/component parameters but you can "steal" them for your own purposes if you wish. Everyone knows how to use variable text in symbols with the backslash technique like this: \Variable_Text\ but there's an alternative! You can simply use a parameter stored in the symbol. For this example, we're going to steal the DESCRIPTION parameter from the cabling parameter table and repurpose it. You can actually invent your own parameter, too. It's not really necessary to use the cabling parameters but we'll stick with repurposing one of them for this example:


Edit your symbol definition and follow these steps - click the images for a larger, more readable slide:


Slide1.PNG

Slide2.PNG

Slide3.PNG

Slide4.PNG

If you don't like the standard &DESCRIPTION parameter, you can skip choosing a parameter from the Edit-->Choose Keywords menu in step 1. You can open the Pro/TABLE and type any parameter you wish into the table. Provide the parameter name in the left column and a default value in the right column. Be sure to use your new parameter with the &<new parameter> format in your note and everything will work perfectly. As an example, here's an example of adding a parameter called "NEW_PARAMETER" to the parameters table:

Slide 5.png

The lesson learned here? Do not believe everything PTC Tech Support tells you. If they've told you "it can't be done", come to PTC Community before you throw in the towel.

Take care and best regards,

-Brian

cspinelli
14-Alexandrite
(To:BrianMartin)

ok Brian, it works but i've another problem to solve...

if i want to choose a limited number of values, as i can use with ATTRIBUTES, is it possible?

Hi Christian...

It seems as though there are a constellation of possibilities with parameters within symbols. I'm not sure any of them will be precisely what you want. I'm not even sure I can detail all of them succinctly without another set of intricate powerpoint slides but I'll try:

  • If you use the \parameter\ nomenclature in the symbol:
    • You can have a "restricted values" list in the symbol
    • Each use of \parameter\ in the symbol is unique (changing one does not change the others) even if you use the same parameter names.

  • If you set a Drawing Parameter (Tools-->Parameters):
    • You can have a "restricted values" list - but this is declared for the entire drawing, not just the one individual symbol
    • You can use &parameter nomenclature in the symbol to access the value of your parameter
    • Each use of &parameter is tied to the current drawing parameter value. If you change one, all of them change simultaneously

  • If you set a parameter in the symbol (Symbol Gallery-->Define/Redefine-->Parameters):
    • You can define parameters which may be accessed in a symbol - these are declared for each individual symbol
    • You can use &parameter nomenclature in the symbol to access the value of your parameter
    • Each use of &parameter is tied to the current symbol parameter value. If you change one, all of them change simultaneously
    • It does not appear to be as easy to use restricted values - but there's a way you can get "close"
      • This requires a clever mixing of \parameter\ and &parameter nomenclatures.
      • This is likely not what you are trying to do but it gets you in the ballpark.
      • There may be another possibility - I did not investigate loading a restricted values file and applying it to the symbol. I'm not sure this is possible but it would be worth an attempt if only to rule it out as an option.

To mix and match parameters and restricted values:

  1. Create a new parameter in your symbol as in the previous tutorial (powerpoint slides from yesterday). For example, you could create a parameter called "TEST"
  2. Create a note in your symbol using the "\param\" notation. For example, you might write the note:
    • \MY_PARAM\ is set here.
  3. Edit the Attributes for the symbol. Under the Var Text tab, enter your restricted values. At the top of the list, as the default pick, enter:
    • &test
    • other restricted values appear one per line below the default
  4. If you need multiple notes, use the "\param\" nomenclature there, too. For example, you may have the notes:
    • Here's another version of \MY_PARAM\
    • And another one here - \MY_PARAM\
  5. Save and exit the symbol.
  6. Create (or "instance") a new symbol on your drawing.
  7. Modify your test as necessary:
    • Double-clicking on your variable text will allow you to change all variable text at once.
    • Right clicking on your variable text and selecting Properties will allow you to select from your drop-down list of restricted values
    • If you manually set two pieces of variable text to be set to two different restricted values, they will behave independently.
    • If you wish to have all pieces of variable text change simultaneously, you can reset them all back to &test.


I realize this is probably not what you were after - but I was pleasantly surprised at the number of options you can come up with by mixing and matching options. You can also set a drawing parameter and add that to your restricted values list. This allows you to simultaneously reference all of the following:

  • The restricted values list
  • The symbol parameter
  • The drawing parameter

I hope that helps... I'm not sure if I've confused the situation more than clarified it though!

Thanks,

-Brian

, It seems that appreciation has not been expressed in proportion to your contribution to this thread.   Thanks for taking the time to display and explain these features!

I do have a question about one of the methods that you stated.  When using the "Drawing Parameter (Tools-->Parameters)" I do not see a way to define the dwg parameter in the dwg and then call it from within the symbol.  I tried the methods that you and others mentioned and could not get it to work.  For example, if I want to call the PDMLink Attribute "Name", &Name does not work.  I also tried it with a company defined attribute, and that also did not work.  Any incites for me? 

Thanks again!  Lawrence


"When you reward an activity, you get more of it!"

Hi Lawrence...

So let me make sure I understand... you want a specific PDMLink attribute, like &PTC_WM_LIFECYCLE_STATE (which shows something akin to "Release Level" for your file) and you cannot get this to work?

In the examples I gave, I created those parameters in the drawing and then called them in the symbol. I'm having a bit of a problem understanding exactly what's not working for you. If you can give me a picture or a slightly more detailed description, I'm happy to help!

Thanks,

-Brian

TomU
23-Emerald IV
(To:BrianMartin)

Brian Martin‌, I just did a quick test with an empty drawing and new symbol.  I created a single parameter in the drawing (no model present) and then attempted to create a symbol that references it.  No matter what syntax I used (&param, &param:d, param:d, etc.), the symbol would not display the drawing parameter value.  Not during symbol creation and not after symbol placement.  Creating a note in the drawing works fine.  This is with Creo 3.0 M050.

BrianMartin
12-Amethyst
(To:TomU)

Hi Tom...

I just did the same test and had no problems whatsoever.

  1. Created a new drawing with NO MODEL, no template, no format. This is a completely empty drawing with no parameters
  2. Created one single drawing parameter called myparam set as a string with the characters "XXX" as the value.
  3. Created a brand new symbol, added a circle (just so it had some shape to it) and a note. For the note, I entered "\my_text\".
  4. Under attributes for the symbol, I specified a free point as the location.
  5. Under the Var Text tab, I replaced the preset value of my_text with the string "&myparam".
  6. Saved and exited the symbol creator.
  7. Placed the new symbol on my drawing... and it shows up as a circle with "XXX" in the middle of it.

Here's the symbol in the symbol editor...

final1.PNG

Here's the symbol on the sheet...

final2.PNG

Here's the entire set of Drawing Parameters...

final3.PNG

This is Creo 2.0 M080 which, I think we all can agree, is a terrible build code to use... but this is what I used for this demo.

Thanks!

-Brian

cspinelli
14-Alexandrite
(To:BrianMartin)

thanks Brian, it works very good also on Creo 2.0 M140

TomU
23-Emerald IV
(To:BrianMartin)

Brian Martin

Based on the original text above, I didn't think it needed the "\ \" around it since it wasn't going to be changeable in the symbol.  I didn't have anything on the symbol's var text page, I was simply typing the text into the note in the symbol.

So I went ahead and tested again.  Here's what I have now:

sym.PNG

The problem I'm running into is that the symbol will not automatically update it's value when the drawing parameter changes.  The only way to get them to update is either redefine the symbol itself or manually open and close the properties for each symbol individually.

sym2.PNG

When you change the drawing parameter's value, do all instances of the symbol immediately update?

Thanks.

‌, thank you for the serious of screenshots and more detailed explanation!  I now got it to work and it works as you said.

‌, thanks for chiming in!  I was somewhat at a loss as to where to start on where I was lost and how to include sensible screenshots and your experience/question matched mine.  As to getting the parameter to update, try update sheets.  That worked for me.  The longer method of saving, erasing, and re-opening also gets it to update. 


"When you reward an activity, you get more of it!"

Hi, Brian

How do you edit in the "Var Text" tab the "my_text" attribute: duplicate it, delete it rearrange in case of more than one "my_text"? only by managing the graphic area? If I make another circle (just to have something and write again "\my_text\", I suppose in the "Var Text" tab I will have two times "my_text", right?

 

Do you have experience with grouping?

 

Thank you,

nic.

Hi Christian...

Please take a look at the solution I posted and let us know if this helps you!

Thanks,

-Brian

cspinelli
14-Alexandrite
(To:BrianMartin)

Brian and all,

thanks for your answer, i will check them asap..

i'm a little busy right now, maybe tonight (in Italy...) i will see if one of your answers are applicable to our problem.

thanks in advance

Hi All,

Thank you, that's a good solution Brian for my application.

Thanks and best regards,

Vincent

Just oher idea:

What about symbol grouping?

01-symbols_grouping.JPG

Source file is attached.

Hope it can helps someone.

Regards

Milan

MS_8853921
2-Explorer
(To:mbonka)

Hello @mbonka, how are you?

 

I would like to create a grouping of symbols for text. If you have a tutorial on how to create these groups, it would help me a lot.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags