Skip to main content
5-Regular Member
November 20, 2025
Solved

Using the code of the .asm in the drawing of the .prt

  • November 20, 2025
  • 2 replies
  • 753 views

Good afternoon i'm using a creo parametric 11 version, i'm trying for my drawing to populate the "code nr." and some other parameter as shown below automatically.
For example a code can be "202500001_11" i want to manually apply che 202500001 code only on the main .asm parameter and use the same code also in all the .prt drawing on the repeat region.
Actually i write this code on the relation of all the .prt


DESCRIZIONE_ORDINE=DESCRIZIONE_ORDINE:1
NOME_PARTICOLARE=rel_model_name
DISEGNATO=DISEGNATO:1
ORDINE=ORDINE:1
CODICE=CODICE:1
DATA_CREAZIONE=DATA_CREAZIONE:1
QNT=QNT:1


And it works, but i cannot save this code in the start part of the .prt because of that ":1" that refer to the .asm and it does not exist in the new .prt.
for the "_11" i'm using matching code like this and it workd perfectly also on the start part

 

IF rel_model_name=="CAV_M"
NR_PARTE="_11M"

Can someone help me with the main code ?

Thank you for your time and help.

Best answer by RPN

Okay you would like to change part numbers based on a common prefix, I guess, you know that this may dangerous 🧐 But anyhow, how are the filenames of this components. Personally I would like to derive the prefix based on the filename, here you can use a parameter within the relation.

If you stick to a common block like parameter, thing about to use a designated layout/notebook. But in this case you have to deal with reassigning the referenced layout at the beginning or if you copy a project, but for all members you can drive the numbering prefix at one spot, like you do with ‚aaa:xx‘

 

2 replies

21-Topaz II
November 20, 2025

Whenever I want to assign values or parameters to the components of an assembly, I do so by passing the values from the assembly, not by using assembly parameters in the part. The part does not have any stored information in it that designates the assembly it belongs to. In fact, a part could belong to multiple assemblies. The part doesn't "know" it is in an assembly. The session ID, the ":1" you are using, is assigned to the assembly based upon what order it was loaded into memory. ":1" is the first, the next will be assigned ":3", etc. Odd numbers for assemblies, even numbers for parts.

Putting relations in start parts that reference assembly session IDs is not going to work, unless you happen to have an assembly with that session ID in memory. But even then, it probably won't work like you hope it will.

I really don't understand exactly what you want to do, here.

5-Regular Member
November 21, 2025

Thank you for your support,

as shown in the picture attached,in the drawing of every components i want to use, for the parameters highlighted in red, the same parameters used in the assembly.

It is possibile ?

 

 

RPN18-OpalAnswer
18-Opal
November 21, 2025

Okay you would like to change part numbers based on a common prefix, I guess, you know that this may dangerous 🧐 But anyhow, how are the filenames of this components. Personally I would like to derive the prefix based on the filename, here you can use a parameter within the relation.

If you stick to a common block like parameter, thing about to use a designated layout/notebook. But in this case you have to deal with reassigning the referenced layout at the beginning or if you copy a project, but for all members you can drive the numbering prefix at one spot, like you do with ‚aaa:xx‘

 

Community Manager
November 27, 2025

Hello @AC_9932786,

 

Looks like you have some responses from our community experts. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

5-Regular Member
November 28, 2025

I solve the problem with the help of both RPN and KenFarley.

Thank you everyone