cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

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

Matt_C
11-Garnet

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

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

11 REPLIES 11
Chris3
21-Topaz I
(To:Matt_C)

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_C
11-Garnet
(To:Chris3)

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
(To:Matt_C)

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

Matt_C
11-Garnet
(To:Chris3)

This thread here might give you a little background on what I'm trying to do and why... 

 

https://community.ptc.com/t5/Windchill/Excluding-Component-From-Windchill-BOM-Structure/m-p/1010426#M84863

 

It is a little tedious which is why a mapkey would be really nice. At the same time though, I don't have to set this parameter on all that many parts, as any part that should be in the BOM can be left blank. Just need to set the "NO's". Most of our assemblies have maybe 0-5 components that need to be marked this way. 

 

Thanks!

 

Chris3
21-Topaz I
(To:Matt_C)

we do something similar but we put the parameter at the part level. This means that component is never put on any BOMs anywhere. There is no option to say include it on BOM_A but not BOM_B which you do get if you create feature parameters. Although with feature parameters you need to strike it off every time you don't want it. The path depends on your business use case.

 

Our solution solves 95% of the problem and for those corner cases we just manually edit the BOM. We have a mapkey that sets the part parameter.

Matt_C
11-Garnet
(To:Chris3)

Ok I see. Yeah, we kind of need the flexibility of the feature parameters. For now I guess I'll just manually set each "NO" value. 

 

Thanks for your input!

Hi @Matt_C,

 

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation. 

 

Thanks,
Anurag 

Hi Anurag,

 

The responses were appreciated but did not answer my specific question.

 

Thanks,

Matt

ByDesign
12-Amethyst
(To:Matt_C)

I use a mapkey to read an .xml file that has parameters to add.  I use the append option so it does not overwrite the existing parameters.  If it is one specific one, use the option that overwrites, with only the one or few parameters needed in the .xml file.  Just make sure you include all the extra dialog box inputs like OK to overwrite in the mapkey.

 

My experience is with Creo 9, not 8, so that may be a difference, IDK.  I have also not done this with feature parameters, but it is something to look into.  Good luck.

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`;

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`;

Announcements

NEW Creo+ Topics: Real-time Collaboration

Top Tags