VPM Search

Customizing the Attributes for Document Revision

This tasks explains how to define VPM Search settings.
  1. Select the Tools > Options... command.

  2. Click the ENOVIA V5 VPM category then select the VPM Search subcategory to display the VPM Search Properties tab:

    Make sure you are connected to ENOVIA V5 VPM. Otherwise, the Customize the Result Window section cannot be visualized.

Results per page

  1. Open the Results per page combo box to select the number of search results you wish to see displayed in the search result window (the default number is 10) or you can manually enter the number you like:

    Uncheck the Fetched On checkbox to deactivate this functionality.

Set the Window Type

  1. You can also select the type of search window to which these customizations will be applied by selecting the window type from the list.

  2. Selecting All Windows will cause the custom settings to apply to all search result windows.  Any other selection will cause the custom settings to change the setting for that window type only and will not affect the other windows.

  3. Each of the selections will change the selections available for Domain and Type in the Customize the Window section.  For example, selecting Enovia to Enovia, the only domains loaded are ENOVIA V5 VPM and DOCDIR and the only type loaded is Document Revision.

Customizing the Columns in the Search Result Window

  1. You can also customize the search result window by selecting, for a given domain and a given object, what columns it should contain and in what order. To do this, choose the domain and object in the Domain and Type fields respectively and, using the Right, Left, Up and Down  buttons, move to the right those attributes to be included in the window. The next time you open the Search workbench, the content of the  search result window will appear accordingly.

  2. Use the Clear button to empty, if necessary, the contents of the list on the right.

  3. Click OK.

Customizing the Attributes for Document Revision

Using Tools > Options..., you can add Lock, Frozen status, and Owner Site attributes along with other attributes for Document Revision in the Search Result Window.


 

  • Lock: Lock attribute gives information on the owner of the object and if it is locked. Next to the lock icon, the value of Lock User is displayed. If the object is not locked, no value is displayed in the Lock column.
    • Icon indicates that the object is locked by you.
    • Icon indicates that the object is locked by another user
  • Frozen Status: This attribute gives the frozen status. The icon is displayed when the object is frozen. If it’s not, there is no icon displayed in Frozen Status column.
  • Owner Site: This attribute gives information on the site where the object has been created. If the owner site name is available, it will be displayed in Owner Site column.

Set Predefined Values In Search

Easy Search tabulation has a button which appears on the right side of the defined attribute which when clicked, gets some predefined values in the fields of each attribute.

To declare a customized dialog to set predefined values in the search panel, the administrator has to create a file named CATImmCustomizedDlg.CATRsc in resource/msgcatalog directory. Inside this CATRsc file, two lines are necessary for each attribute to define the name of the command and the associated icon:

Format of the two lines:
<Object Type>.<Attribute Keyword>.Command = “MyCommand”;

<Object Type>.<Attribute Keyword>.Icon = “I_MyToolVers”

<Object Type> is the ENOVIA type defined in the metadata. It can be a DS provided one or a customized one.
<Attribute Keyword> is the ENOVIA name defined in the metadata. It can be a DS provided one or a customized one.

Sample 1:
In this sample, only one command is defined for the attribute V_ID on Part Version object type.
ENOVIA_VPMPartVersion.V_ID.Command = “MyCommand”;
ENOVIA_VPMPartVersion.V_ID.Icon = “I_MyToolVers”;

Sample 2:
In this sample two commands are defined for Part Version object type. One on V_ID attribute and the other on V_status attribute.
ENOVIA_VPMPartVersion.V_ID.Command = “MyCommand1”;
ENOVIA_VPMPartVersion.V_ID.Icon = “MyIcon1”;
ENOVIA_VPMPartVersion.V_status.Command = “MyCommand2”;
ENOVIA_VPMPartVersion.V_status.Icon = “MyIcon2”;

Note that a same command or a same icon can be used for all attributes.

ENOVIA_VPMPartVersion.V_ID.Command = “MyCommand”;
ENOVIA_VPMPartVersion.V_ID.Icon = “MyIcon”;
ENOVIA_VPMPartVersion.V_status.Command = “MyCommand”;
ENOVIA_VPMPartVersion.V_status.Icon = “MyIcon”;

The command definition

The command to create is a normal CAA one.
This command has to be created as a SHARED command not as an exclusive one because the VPM Search command gets deleted.
The command declaration is as follows:

#include " CATCreateExternalObject.h "
CATCreateClassArg(MyCmd, SearchParameter) ;
MyCmd::MyCmd (SearchParameters *pSP) : public CommandBaseClass

pSP is a pointer to the parameter described in detail in the following paragraph.
Some input parameters are available for the customized command to manage a dedicated dialog to set some predefined values for attributes. It is possible to set just one attribute value or all of them.
Structure of the parameter given to the command
The given argument to the command header is a C++ structure defined as follow:

struct SearchParameters {
int numberOfAttributes; /* Input Parameter */
CATUnicodeString TypeOfObject; /* Input Parameter */
int selectedAttribute; /* Input Parameter */
CATListValCATUnicodeString ListOfDomains; /* Inputs Parameters */
CATListValCATUnicodeString ListOfAttributes; /* Inputs Parameters */
CATListValCATUnicodeString ListOfValues; /* Output Parameters set to “” by default */
};


Parameters description

This structure has to be read as an array with numberOfAttributes rows. The current type is set in TypeOfObject.
In ListOfDomains[1] we have the domain for the attribute named in ListOfAttributes[1] and it can be valuated using ListOfValues[1]. selectedAttribute defines the selected attribute in the list.
Values in ListOfValues are set by default with the string defined in the fields when the command is run.
To set the value of one attribute, just use ListOfValues[1] = “myValue”
CATUnicodeString is used for all the type of attributes and some conversion is  be applied on retrieved parameters.

The ENOVIA provided object types are:
• ENOVIA_VPMPartVersion,
• ENOVIA_VPMDocumentRevision,
• ENOVIA_VPMAction,
• ENOVIA_VPMProductRootClass,
• ENOVIA_VPMItemInstance,
• ENOVIA_VPMContext,
• ENOVIA_V514TechPackVersion.
Customized object types can be used.

Sample of the command:

#include " CATCreateExternalObject.h "

struct SearchParameters {
int numberOfAttributes; /* Input Parameter */
CATUnicodeString TypeOfObject; /* Input Parameter */
int selectedAttribute; /* Input Parameter */
CATListValCATUnicodeString ListOfDomains; /* Inputs Parameters */
CATListValCATUnicodeString ListOfAttributes; /* Inputs Parameters */
CATListValCATUnicodeString ListOfValues; /* Output Parameters */
};

CATCreateClassArg(MyCmd, SearchParameter) ;
MyCmd::MyCmd (SearchParameters *pSP) : public CommandBaseClass
{

}