Skip to main content
14-Alexandrite
April 11, 2018
Solved

Get Parameter value from parent

  • April 11, 2018
  • 1 reply
  • 3329 views

HI

 

Is there any way to get a parameter value from parent assembly?

 

Example:

Parent assembly has the parameter PROJECT_NAME= ProjectABC

I have the same parameter on the parts "PROJECT_NAME", and I want to populate it with the value from the parent assembly "ProjectABC".

 

Thanks

Best answer by TomU

Yes, but you don't use the assembly's name, you use its session id.  See this help page for details:

http://support.ptc.com/help/creo/creo_pma/usascii/#page/fundamentals%2Ffundamentals%2Ffund_seven_sub%2FTo_Specify_a_Parameter_in_Another_Model.html%23

 

You can "push" the assembly parameter down to the model or you can "pull" it from the assembly into the model.  I would suggest pushing from the assembly since the assembly may not be in session if just the model is opened and this can lead to failed relation statements

 

Example

Assembly Session ID: 0

Model Session ID: 1

 

"Push" from Assembly

MODEL_PARAM:1 = ASM_PARAM

 

"Pull" from Model

MODEL_PARAM = ASM_PARAM:0

 

It's fine to use the same parameter name in both places (like you have).  When no session ID is used, the local parameter is automatically referenced.  So your final relation will look something like this in the assembly relations (with a different session ID of course):

PROJECT_NAME:1 = PROJECT_NAME

1 reply

TomU23-Emerald IVAnswer
23-Emerald IV
April 11, 2018

Yes, but you don't use the assembly's name, you use its session id.  See this help page for details:

http://support.ptc.com/help/creo/creo_pma/usascii/#page/fundamentals%2Ffundamentals%2Ffund_seven_sub%2FTo_Specify_a_Parameter_in_Another_Model.html%23

 

You can "push" the assembly parameter down to the model or you can "pull" it from the assembly into the model.  I would suggest pushing from the assembly since the assembly may not be in session if just the model is opened and this can lead to failed relation statements

 

Example

Assembly Session ID: 0

Model Session ID: 1

 

"Push" from Assembly

MODEL_PARAM:1 = ASM_PARAM

 

"Pull" from Model

MODEL_PARAM = ASM_PARAM:0

 

It's fine to use the same parameter name in both places (like you have).  When no session ID is used, the local parameter is automatically referenced.  So your final relation will look something like this in the assembly relations (with a different session ID of course):

PROJECT_NAME:1 = PROJECT_NAME

hdasilva14-AlexandriteAuthor
14-Alexandrite
April 11, 2018

That's exactly what I was looking for 🙂

Thank You!