Skip to main content
12-Amethyst
October 3, 2023
Solved

Windchill custom action creation

  • October 3, 2023
  • 1 reply
  • 2097 views

Hello,

I have developed a custom action menu on WTPart (a default object in Windchill), but for some reason, the same action menu is appearing on its child objects as well.

I would like to know how I can limit the display of this custom action menu only to the main WTPart object and not its children.

Regards,
Shrikant Bhosle

 

 

 

Best answer by SB_10566278

Hi,

 

I employed custom-actionModel.XML configuration instead of a UI validator for this particular task.
According to the PTC guide, it is also possible to achieve this using XML file configuration instead of a UI validator.
Please correct me if I have misunderstood.

Ref:
<supportedTypes>
    <type value="wt.part.WTPart" applyToDescendants="false"/>
</supportedTypes>

Link:
https://support.ptc.com/help/wnc/r12.0.2.0/en/index.html#page/Windchill_Help_Center%2FWCCG_UICust_AddActionsHook_WCClientArchAction_AddingValidation.html

 

Best Regards,

Shrikant Bhosle

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
October 3, 2023

Hi @SB_10566278 

You can create own validator that checks the subtype information and base on this info you show or not show the action

 

CS52551 - How to write UI Validator

 

Community - How to create and register an tab Validator in Windchill

 

PetrH

SB_1056627812-AmethystAuthorAnswer
12-Amethyst
October 4, 2023

Hi,

 

I employed custom-actionModel.XML configuration instead of a UI validator for this particular task.
According to the PTC guide, it is also possible to achieve this using XML file configuration instead of a UI validator.
Please correct me if I have misunderstood.

Ref:
<supportedTypes>
    <type value="wt.part.WTPart" applyToDescendants="false"/>
</supportedTypes>

Link:
https://support.ptc.com/help/wnc/r12.0.2.0/en/index.html#page/Windchill_Help_Center%2FWCCG_UICust_AddActionsHook_WCClientArchAction_AddingValidation.html

 

Best Regards,

Shrikant Bhosle

HelesicPetr
22-Sapphire II
22-Sapphire II
October 4, 2023

Hi @SB_10566278 

I'm not sure if you can define the subtype string 

It is generally used for root (parent)types. 

 

So WTPart, Document, CADDocument, Operation atc. 

 

also you can try to use specific type definition for subtype like "wt.part.WTPart|com.ptc.MYSubtype"
But I preferer to use the validator.

 

PetrH