![]() |
This tasks explains how to define VPM Search settings. | ||
![]() |
Results per page
Set the Window Type
Customizing the Columns in the Search Result Window
Customizing the Attributes for Document RevisionUsing Tools > Options..., you can add Lock,
Frozen status, and Owner
Site attributes along with other attributes for Document
Revision in the Search Result Window.
|
||
![]() |
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>.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
{ |
||
|