Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11560

Re: How To add new Action to a Menu in Windchill 10.1

$
0
0

Hi Vivek,


You can try below. This instructions for Note (subtype of EPMDocument) Object type, but instructions are same for other type too.


1.       The RMB menu for Note object uses “epmdocuments details page actions” model from <WT_HOME>\codebase\config\actions\UwgmCadx-actionmodels.xml file

 

2.       Copy this entire model to <WT_HOME>\codebase\config\actions\custom-actionModels.xml file

 

3.       You can add you custom action details in the same model as shown below:

 

<modelname="epmdocuments details page actions"menufor="wt.epm.EPMDocument">

.

.

.

<actionname="inflateNotes"type="customInflateNoteActions"resourceBundle="ext.TEST.ActionDefinitionsRB"/>   <!-- Custom Action in Objects Action Drop Down List -->

.

</model>  

     

4.       In the <WT_HOME>\codebase\config\actions\custom-actions.xml file add objecttype  for above action. I below will goes to this file:

 

<objecttypename="customInflateNoteActions"class="wt.epm.EPMDocument|com.ptc.ptcnet.DynamicDocument|com.ptc.ptcnet.Note"resourceBundle="ext.TEST.ActionDefinitionsRB">

<actionname="inflateNotes"uicomponent=""ajax="component">

<description>Create a Inflate Note</description>

<commandclass=""method="execute"windowType="popup"url="netmarkets/jsp/ext/custom/InflateNotes/inflateNotes.jsp"/>

</action>

</objecttype>

 

5.       Place your inflateNotes.jspfile under <WT_HOME>\codebase\netmarkets\jsp\ext\custom\InflateNotes directory

 

6.       Create a Resource file ActionDefinitionsRBunder <WT_HOME>\src\ext\TEST directory which renders Labelling for your custom action

 

7.       Compile this Resource file ActionDefinitionsRBwith below command from Windchill Shell: (Do not copy paste above command in Windchill Shell)

 

tools class -Dclass.includes=ext\TEST\**

 

8.       Make sure BUILD SUCCESSFUL and ActionDefinitionsRB.class file is created under <WT_HOME>\codebase\ext\TEST directory

 

9.      Stop Windchill Method Server

 

10.   Clear Tomcat, Info*Engine cache

 

11.   Restart Windchill Method Server


               Inflate note.png


Viewing all articles
Browse latest Browse all 11560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>