0% found this document useful (0 votes)
89 views2 pages

Create Custom Actions in Windchill

The document outlines the steps to create a custom action in Windchill by adding entries in two XML files: custom-actions.xml and custom-actionModels.xml. It includes instructions for creating a Java resource bundle and a Java class to implement the action functionality. Finally, it advises restarting the method server after modifications and provides a way to debug the action creation process.

Uploaded by

ranjalahynyantsa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views2 pages

Create Custom Actions in Windchill

The document outlines the steps to create a custom action in Windchill by adding entries in two XML files: custom-actions.xml and custom-actionModels.xml. It includes instructions for creating a Java resource bundle and a Java class to implement the action functionality. Finally, it advises restarting the method server after modifications and provides a way to debug the action creation process.

Uploaded by

ranjalahynyantsa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Step 2: Create Action

Below are the steps given to add an action:

Create two new files [Link] and custom-actionModels

1. Add your action in <windchill>/codebase/config/actions/[Link]


<?xml version="1.0"?>
<!DOCTYPE listofactions >

<listofactions>

<objecttype name="brahimaction" >


<action name="myAction" resourceBundle="[Link]">
<command class="[Link]" method="createPart"/>
</action>
</objecttype>

</listofactions>

2. Make the action entry in <windchill>/codebase/config/actions/custom-


[Link]
<?xml version="1.0"?>
<!DOCTYPE actionmodels >

<actionmodels>

<model name="folderbrowser_toolbar_new_submenu" resourceBundle="[Link]">


<description>'New' submenu for folder browser toolbar actions menu.</description>
<action name="create" type="document" shortcut="true" /> <!-- New Document -->
<action name="createMulti" type="document" /> <!-- New Multiple Documents -->
<action name="uploadDocumentsFromCompressedFile" type="document" /> <!-- Upload Documents from Compressed
File -->
<action name="separator" type="separator" />
<action name="createPartWizard" type="part" shortcut="true" /> <!-- New Part -->
<action name="createMultiPart" type="part" /> <!-- New Multiple Parts -->
<action name="assignMultiPlant" type="enterprisedata" /> <!-- Assign Multiple Plants -->
<action name="newPlantFunctionalData" type="baseclient" /> <!-- Create PFD Manually-->
<action name="accessPlantData" type="baseclient" /> <!-- Edit PFD Manually-->
<action name="createWorkSetWizard" type="workSet"/>
<action name="separator" type="separator" />
<action name="createProductFamily" type="productfamily"/>
<action name="separator" type="separator" />
<action name="createMpmprocessplan" type="mpml"/> <!-- New Process Plan -->
<action name="createMPMResource" type="mpml"/> <!-- New Resource -->
<action name="createMPMStandardOperation" type="mpml"/>
<action name="createMPMStandardGroup" type="mpml"/>
<action name="createMPMStandardCC" type="mpml"/>
<action name="separator" type="separator" />
<action name="create" type="changeNotice" /> <!-- New Change Notice -->
<action name="createChangeDirective" type="changeDirective" shortcut="true" /> <!-- New Change Directive -->
<action name="create" type="changeRequest" shortcut="true" /> <!-- New Change Request -->
<action name="create" type="problemReport" /> <!-- New Problem Report -->
<action name="create" type="softwareIssue" /> <!-- New Software Issue -->
<action name="create" type="variance" /> <!-- New Variance -->
<action name="create" type="promotionRequest" /> <!-- New Promotion Request -->
<action name="separator" type="separator" />
<action name="create" type="changeReview" shortcut="true" /> <!-- New Change Review -->
<action name="separator" type="separator" />
<action name="create_request" type="npi"/> <!-- New Part Request -->
<action name="separator" type="separator" />
<action name="createTextualInformationElement" type="techPubs" /> <!-- New Textual Information
Element -->
<action name="createGraphicInformationElement" type="techPubs" /> <!-- New Graphic Information
Element -->
<action name="createPartListInformationElement" type="techPubs" /> <!-- New Parts List Information
Element -->
<action name="createPubStructWizard" type="arbortext"/> <!-- New Publication Structure -->
<action name="createPubStructWizard" type="rules"/> <!-- New Publication Structure
(Rules) -->
<action name="createASPSWizard" type="asps"/> <!-- New Information Structure -->
<action name="createServicePH" type="corestruct"/> <!-- New Service Product
Hierarchy -->
<action name="separator" type="separator" />
<action name="create" type="folder" shortcut="true" /> <!-- New Folder -->
<action name="add_link" type="bookmark" /> <!-- New Link -->
<action name="separator" type="separator" />
<action name="separator" type="separator" />
<action name="createNoteMenuAction" type="note" /> <!-- New Note -->
<action name="createNoteFromTemplateMenuAction" type="note" /> <!-- New Note from Template -->
<action name="separator" type="separator" />
<action name="createBaseline" type="baseline" /> <!-- New Baseline -->
<action name="create" type="managedcollection" /> <!-- New Managed Collection -->
<action name="separator" type="separator" />
<action name="createSpecification" type="specification" resourceBundle="[Link]" />
<!-- New Specification -->
<action name="doc_insert_from_folder" type="document" /> <!-- Insert Document -->
<action name="part_insert_from_folder" type="part" /> <!-- Insert Part -->
<action name="createUDI" type="udi"/> <!-- New UDI Submission -->
<action name="separator" type="separator" />
<action name="myAction" type="brahimaction" />
</model>

</actionmodels>
3. Create a Java file [Link] that holds resource
bundle information.
package [Link];

import [Link];
import [Link];
import [Link];

@RBUUID("[Link]")
public class brahimActionRB extends WTListResourceBundle {

@RBEntry("Create Part brahim")


public static final String Create_PART_TITLE = "[Link]";

@RBEntry("Create Part brahim")


public static final String Create_PART_description = "[Link]";

@RBEntry("[Link]") // <WT_HOME>/codebase/netmarkets/images
public static final String MY_ICON = "[Link]";

@RBEntry("Create Part brahim Tooltip")


public static final String MY_TOOLTIP = "[Link]";

4. Create a Java file [Link] that holds class to create


new part.
package [Link];
import [Link];

import [Link];
import [Link];
import [Link];
import [Link];
public class CustomClass {

public static void createPart(NmCommandBean ncb ) throws WTException, WTPropertyVetoException {


[Link]("************************************** hello *************************************");
WTPart part = [Link]();
String number = "0000005002";
String name = "TestPartbrahimaction";
[Link](number);
[Link](name);
[Link](part);
}
}

Restart method server in any class modification

Get information about action from jcaDebug=1

You might also like