Quality Rules EKL Functions

The Quality Rules Configuration apps are used to customize actions performed on the server.

This page discusses:

GetRepResult

The GetRepResult function retrieves the latest assesment result. The assement result is an object that contains the most recent profile Solve and an object that contains a set of checks.

Note: The availability of this function is Execution Controlled.

Signature

DatabaseObjectType GetRepResult(PLMCoreReference , String)

Arguments

Name Input / Output Required? Type Comment Execution Profile
PLMCoreReference In Yes PLMCoreReference The object. Constant read.
String In Yes String Profile name. Local read.

ReturnType

DatabaseObjectType : Last assessment result object

Example 1

repRes = GetRepResult(iRoot,”Mechanical Profile”)

GetValidationFromAssessmentResult

The GetValidationFromAssessmentResult calcuates a score based on the most recent assesment result of a given profile. For example:

Signature

Integer GetValidationFromAssessmentResult(PLMCoreReference : String)
Score Description
1 The model is valid (certification is performed automatically or manually).
0 The model is rejected (certification is performed automatically or manually).
-1 This score detects an error.
-2 The root product was modified after a Solve was run on a profile.

Arguments

Name Input / Output Required? Type Comment Execution Profile
PLMCoreReference In Yes PLMCoreReference The object. Constant read.
String In Yes String Profile name. Local read.
Important: The GetValidationFromAssessmentResult function is deprecated.

ReturnType

Integer : Score

Example 1

score = GetValidationFromAssessmentResult (iRoot,”Mechanical Profile”)

DesignQualityResult

The DesignQualityResult EKL object corresponds to a result.

Methods

Name Return Type Argument Comment
GetQualityWeight Integer -- Returns the quality score of the result.
GetSolveTimeStamp Date -- Returns the solve time stamp of the last stored result.
GetQualityWeightComputeMode String -- Returns the weight computation mode (sum of violated weights or check weight only).
IsUpToDate() Boolean -- Returns if the quality control is up to date.

GetDesignQualityResult

The GetDesignQualityResult EKL method retrieves the last design quality results associated with the object.

Arguments

Name Input / Output Required? Type Comment
ThisObject In Yes PLMEntity The object.
ProfileNameAndRevision In Yes String Profile name and revision (for example "mechanical A").

Arguments

Name Input / Output Required? Type Comment
ThisObject In Yes PLMEntity The object.
ProfileNameAndRevision In Yes String Profile name and revision (for example "mechanical A").

ReturnType

DesignQualityResult

Example 1

let result  (DesignQualityResult)
let score (Integer)
let solveDate(Date)
let since(Date)
since = BuildDate(2023,02,23)

result  = GetDesignQualityResult(ThisObject,"Mechanical Profile A")

Validation = false

if(result   <> NULL) {
                score = result.GetQualityWeight()
               solveDate = result.GetSolveTimeStamp()
                
                if(score == 0 AND since < solveDate)
                                Validation = true
}