javaptc-windchill

How to create a command in part view that fires Java code


We want to add a command (a button, a menu item, an entry in a context menu or similar) in the part view to execute Java code. In the Java code there should be a reference to the part.

We tried to add entries in psb-actionmodels.xml and cat-actions.xml without success - no menu item appears.

What are we missing?

enter image description here


Solution

  • I guess you're trying to create an action under part information page's menu. Your approach of adding the action button is not the PTC's recommended way. Although it will work but your customizations will become difficult to maintain during the upgrade.

    Try the following steps to add an action button to call your java code

    Windchill help center has detailed procedure for this https://support.ptc.com/help/windchill/whc/whc_en/#page/Windchill_Help_Center%2FWCCG_UICust_AddActionsHook_WCClientArchAction.html