Customize Traceability Matrix (FL_TraceabilityMatrixCommandsCusto)

An opening ID is an entry point used to customize business logic. The FL_TraceabilityMatrixCommandsCusto business logic allows to add commands displayed in the traceability matrix, through the context menu. For example, the following commands can be useful on implement relation: Create, Edit, Delete, Properties, etc.

To customize the context menu, you must declare the file containing the script to be executed in PLMBusinessLogicFLEditor.CATRuleExit:

Script OpeningID="FL_TraceabilityMatrixCommandsCusto
ScriptName="RFLP_TraceabilityMatrixCommandsCusto"

In this example, the script RFLP_TraceabilityMatrixCommandsCusto is executed every time a traceability matrix is generated.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked every time the traceability matrix is generated.

This opening ID is used to add commands in the context menu displayed in the traceability matrix.

The table below provides you with information related to the definition of the opening ID.

PLM Opening ID: FL_TraceabilityMatrixCommandsCusto
Customization intent: Execution
Execution context:Client

Input Objects

Input objects must be of the following type: ThisObject.

Context Object Parameters

Parameter NameTypeRead/WriteComments
CurrentWorkshopString WriteThis attribute is the current workshop name.

To obtain the name of a workshop:

let sCurrentWorkshop(String)
set sCurrentWorkshop = Parameters->GetAttributeObject ("CurrentWorkshop")

CurrentWorkbenchStringWriteThis attribute is the current app name.

To obtain the name of an app:

let sCurrentWorkbench(String)
set sCurrentWorkbench = Parameters->GetAttributeObject ("CurrentWorkbench")

IsProjectStringWriteThis attribute is boolean to identify if an implement relation already exists for the cell.

To obtain this value:

let bIsProjected (Boolean)
set bIsProjected = Parameters->GetAttributeObject ("IsProjected")

MenuCmdListListWriteThe list of commands is described through a list of strings called MenuCmdList in the script Parameters.

This Parameters script returns the list and then assign it to the "MenuCmdList" attribute.

By default the attribute "MenuCmdList" of the script 'parameters' contains the description of the default command to create, edit and delete implement relations defined by Functional & Logical Design.

To obtain this default menu content:

let MenuList(List)
set MenuList = Parameters->GetAttributeObject ("MenuCmdList")

Warning: Three commands maximum can be defined in the list.

Tip: The input command list is defined with the IsProjected attribute value.

Sample

The following sample adds commands in the context menu of the traceability matrix.

let MenuList(List)
let CurrentCommand(String)
let bIsProjected(Boolean)
set bIsProjected = Parameters->GetAttributeBoolean ("IsProjected")
set MenuList = Parameters->GetAttributeObject ("MenuCmdList")
MenuList.RemoveAll()
if(bIsProjected == true)
{
	CurrentCommand = "Delete"
	MenuList.Append(CurrentCommand)
	CurrentCommand = "CATPLMEditorImplementConnectionCmdHdr"
	MenuList.Append(CurrentCommand)
	CurrentCommand = "CATPLMEditorDisplayImplementRelationCmdHdr"
	MenuList.Append(CurrentCommand)
	Parameters->SetAttributeObject("MenuCmdList", MenuList)
}
else
{
	CurrentCommand = "CATPLMEditorImplementConnectionCmdHdr"
	MenuList.Append(CurrentCommand)
	Parameters->SetAttributeObject("MenuCmdList", MenuList)
}