PLMQuery Functions

Functions used to perform queries in the database.

This page discusses:

CreatePLMQuery

Function used to create an object of PLMQuery type to do queries in the database.

Signature

CreatePLMQuery(queryType: String) : PLMQuery

Arguments

Name Input / Output Required? Type Comment
queryType In Yes String Object type your are looking for (VPMReference...)

ReturnType

PLMQuery

When the object is returned, the query is not launched. The object is used to determine the attributes to be filtered then the query is launched.

GetEditorRoots

Function used to get the list of the roots of the current editor.

Signature

GetEditorRoots(EntityType : String) : List

Arguments

Name Input / Output Required? Type Comment
EntityType In Yes String

ReturnType

List

Example

Let l(List)
Let rootOfEditor(RFLPLMFunctionalReference)
[…]
l = GetEditorRoots("RFLPLMFunctionalReference")
if l.Size() >= 1
{
rootOfEditor = l[1]
}
In the above example, the rootOfEditor variable contains the Functional root of the editor.

GetEditorRootOccurrences

Function used to get the list of the root occurrences of the current editor.

Signature

GetEditorRootOccurrences(EntityType : String) : List

Arguments

Name Input / Output Required? Type Comment
EntityType In Yes String

ReturnType

List

Example

let roots(List)
let rootOfEditor(Feature)
roots = GetEditorRootOccurrences("Feature") 
if roots->Size() == 1
{
	rootOfEditor = roots[1]
	Notify ("Object name #", rootOfEditor.Name)
}

Or:
if roots->Size() == 2
{
	rootOfEditor = roots[2] // choose here which root name should be displayed.
	Notify ("Object name #", rootOfEditor.Name)
}
Or:
if roots->Size() == 3
{
	rootOfEditor = roots[3] // choose here which root name should be displayed.
	Notify ("Object name #", rootOfEditor.Name)
}
In the above example, the rootOfEditor variable may contain different kinds of root occurrences (Functional, Logical and Product).