Skip to main content
12-Amethyst
May 12, 2025
Question

Can't Record Mapkey For Creating Feature Parameter From Model Tree

  • May 12, 2025
  • 2 replies
  • 1541 views

Hi,

 

I'm using Creo 8.0.10.0. I am trying to create a mapkey that will create/set a yes/no feature parameter ("Feat Param") from the model tree in an assembly. However, I need to be able to tell Creo which feature (part or subassembly) in the model tree is to have the parameter applied to, but when I click on the parameter field in the model tree, the parameter window opens and the mapkey window then becomes inactive and I cannot pause/resume or do anything until the parameter window is closed. Is there any other way to set these parameters that would maybe allow the mapkey to be recorded? 

 

Thanks,

Matt

2 replies

Chris3
21-Topaz I
May 12, 2025

Is there a reason you can't have the mapkey open that model and then modify the parameter and then close the model?

 

Right clicking on the model tree is going to pose problems with a mapkey because it records the node location of the tree rather than a filename or other identifier. If you have the model open though, it will perform the actions on the active part.

Matt_C12-AmethystAuthor
12-Amethyst
May 12, 2025

This is a feature parameter and not a part parameter. I don't have a good understanding of the differences but I thought you couldn't see the feature parameter when you open the model because it's made at the assembly level? The same part can end up with different parameter values if it is in multiple different assemblies. Once you add the feat param to the model tree as a column, all you do to set the parameter for a certain part/sub-assembly is to click on the cell in the model tree and the parameter properties window opens up. In the example below, I would like to create a mapkey that will set a selected component's "SYSPRO_BOM" feat param to a value of "NO". I don't mind if I have to start the mapkey, then a pause to select the column cell, then resume the mapkey. Or if there is any other work around method...

 

Thanks!

 

Matt_C_0-1747073531803.png

Matt_C_1-1747073712444.png

Matt_C_2-1747073770446.png

 

Chris3
21-Topaz I
May 13, 2025

Sorry I glossed over the feature parameter part of your question. You are correct, these are assigned at the assembly level and not the part level. My company does not use these so I am not going to be the best resource for this answer.

 

You companies workflow of setting BOM Yes/No at the assembly level seems tedious. I am not sure what events lead you to that path, but it seems to me that there are more efficient workflows. For instance, we manage BOMs in Windchill and have a similar parameter at the part level and then just add or subtract items within Windchill. If you manage BOMs on a drawing then you can filter items with relations in repeat relations or individually .

 

This thread may or may not be useful for you:
https://community.ptc.com/t5/3D-Part-Assembly-Design/Possible-to-Import-XML-data-for-feature-level-parameters/td-p/995572

12-Amethyst
June 9, 2025

Try this one. I used "zz" as the mapkey. Change it to what you desire.

 

mapkey zz @MAPKEY_LABELsyspro_bom;~ Command `ProCmdMmParams` ;\
mapkey(continued) ~ Open `relation_dlg` `OMContext`;~ Close `relation_dlg` `OMContext`;\
mapkey(continued) ~ Select `relation_dlg` `OMContext` 1 `feature`;\
mapkey(continued) @MANUAL_PAUSESELECT THE FEATURE TO CHANGE\;\nCLICK RESUME;\
mapkey(continued) ~ FocusIn `relation_dlg` `ParamsPHLay.ParTable`;\
mapkey(continued) ~ Arm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowSYSPRO_BOM` `value`;\
mapkey(continued) ~ Disarm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowSYSPRO_BOM` `value`;\
mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable` 2 `rowSYSPRO_BOM` `value`;\
mapkey(continued) ~ Open `relation_dlg` `ParamsPHLay.ParTable_INPUT`;\
mapkey(continued) ~ Close `relation_dlg` `ParamsPHLay.ParTable_INPUT`;\
mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable_INPUT` 1 `NO`;\
mapkey(continued) ~ Activate `relation_dlg` `PB_OK`;

12-Amethyst
June 9, 2025

I revised it a little. I think this will do it, but it depends on the parts and assemblies already having the "syspro_bom" parameter.

When it pauses, you need to select if it will be a part or assembly, then select that item, then resume.

 

mapkey zz @MAPKEY_LABELsyspro_bom;~ Command `ProCmdMmParams` ;\
mapkey(continued) @MANUAL_PAUSESELECT PART OR ASSEMBLY TO CHANGE\;\nCLICK RESUME;\
mapkey(continued) ~ FocusIn `relation_dlg` `ParamsPHLay.ParTable`;\
mapkey(continued) ~ Arm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowSYSPRO_BOM` `value`;\
mapkey(continued) ~ Disarm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowSYSPRO_BOM` `value`;\
mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable` 2 `rowSYSPRO_BOM` `value`;\
mapkey(continued) ~ Open `relation_dlg` `ParamsPHLay.ParTable_INPUT`;\
mapkey(continued) ~ Close `relation_dlg` `ParamsPHLay.ParTable_INPUT`;\
mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable_INPUT` 1 `NO`;\
mapkey(continued) ~ Activate `relation_dlg` `PB_OK`;