PLMQuery types Methods

Methods used to perform queries in the database based on the language and to change the creation container of GSD features

Note: The following functions are KML/Know-how Apps Components specific.

This page discusses:

PLMQuery.AddCriterion()

Method used to add conditions on to attributes values.

Signature

PLMQuery.AddCriterion(plmQuery: PLMQuery, attributeName: String, 
attributeValue: String) : List

Arguments

Name Input / Output Required? Type Comment
attributeName In Yes String Attribute name.
attributeValue In Yes String Value.

PLMQuery.AddCriterionOnExtension()

This method works on extensions attributes. Only the objects with a specified extension will be queried.

Signature

PLMQuery.AddCriterionOnExtension(extensionType: String, 
attributeName: String) :attributeValue: String) VoidType

Arguments

Name Input / Output Required? Type Comment
extensionType In Yes String The extension containing the attribute to filter on.
attributeName In Yes String The name of the attribute as defined on the extension.
attributeValue In Yes String The value of the attribute. The value of the attribute. An asterisk (*) can be used as a wild card at the end of the attribute value.

Example

let myQuery(PLMQuery)
let results(List)
let currentResult(PLMQueryResult)
let currentResultLoaded(CarExt)

myQuery = CreatePLMQuery("VPMReference")

myQuery->AddCriterionOnExtension("CarExt","DoorsNumber","3")

results = myQuery->RunQuery()

for currentResult inside results
{
set currentResultLoaded = currentResult->LoadResult()
// Apply treatment on results here
}

PLMQuery.RunQuery()

Function used to launch the query.

Signature

PLMQuery.RunQuery(plmQuery: PLMQuery) : List

Arguments

Name Input / Output Required? Type Comment
plmQuery In Yes PLMQuery Objet returned by CreatePLMQuery.

ReturnType

List

Returns the results list containing objects of PLMQueryResult type. These objects are only identifiers and are not loaded.

PLMQueryResult.LoadResult()

Function used to load the objects of the list.

Signature

PLMQueryResult.LoadResult(plmQueryResult: PLMQueryResult) : Feature

Arguments

Name Input / Output Required? Type Comment
plmQueryResult In Yes PLMQueryResult Result to be loaded.

ReturnType

Feature

Returns the loaded object.