...
Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpfValidateInstance (instanceId : GENERIC;
diagnosticFile : STRING;
options : INTEGER;
ruleSchemaId : GENERIC;
userOutputFile : STRING;
VAR validationResultsId : GENERIC;
result : LOGICAL;
|
The xpfValidateInstance function validates an instance, i.e. checks that the attribute values of the instance do not violate any of the constraints/rules defined in the corresponding entity definition.
<instanceId> The <instanceId> The instance to be checked.
<diagnosticFile> Name <diagnosticFile> Name of file where the diagnostics are placed.
The argument options specifies the options that should be used during the validation. The options argument should be specified as a zero or as a sum of one or more of the following integer constants:
XPXAGGREGATE_DATA_TYPE XPXAGGREGATE_SIZE
XPXAGGREGATE_UNIQUENESS XPXARRAY_REQUIRED_ELEMENTS
XPXATTRIBUTE_DATA_TYPE XPXCREATE_RESULT_MODEL
XPXDETAILED_OUTPUT XPXFULL_OUTPUT
XPXFULL_VALIDATION XPXSTOP_ON_FIRST_ERROR
The options are equivalent to the options used in the EDMinterfaceTM function edmiValidateInstance except for the XPX prefix.
This function is equivalent to the EDMinterfaceTM function edmiValidateInstance.
Arguments
...
Type | Name | Comment |
GENERIC | instanceId | Instance id of the instance to be validated |
STRING | diagnosticFile | Path to the diagnostic file |
INTEGER | options | options, see below |
GENERIC | ruleSchemaId | Unique id of the rule schema within the EDMdatabase |
STRING | userOutputFile | Path to the output file |
GENERIC | validationResultsId |
Return Value
...
Type | Name | Comment |
LOGICAL | result | comments |
Options
...
Option | Comment |
---|---|
XPXFULL_VALIDATION | Specifies that the actual instance will be validated against all rules and constrains that is applicable for this particular instance. When the argument <ruleSchemaId> is specified unequal to zero, this options means the following options: |
XPXGLOBAL_RULES | Specifies that all global rules appropriate for the specified instance will be validated. These global rules are defined in the appropriate dictionary model (Express schema) or defined in the specified EDMruleSchema. |
XPXLOCAL_RULES | Specifies that all local rules (Where rules) appropriate for the specified instance will be validated. These local rules are defined in the appropriate dictionary model (Express schema) or defined in the specified EDMruleSchema. |
XPXINVERSE_RULES | Specifies that all Inverse constraints defined for the actual instance will be validated. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXUNIQUENESS_RULES | Specifies that all Uniqueness rules defined for the actual instance will be validated. |
XPXREQUIRED_ATTRIBUTES | Specifies that all mandatory attributes, i.e., all explicit attributes that are not declared to be OPTIONAL, of the instance will be checked for an assigned value, i.e., checked that the attribute values are set. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXATTRIBUTE_DATA_TYPE | Specifies that all attribute values of the instance will be checked for legal data type. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXAGGREGATE_DATA_TYPE | Specifies that all element values in all aggregates owned by the specified instance will be checked for legal data type. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXAGGREGATE_SIZE | Specifies that the number of elements in all aggregates owned by the specified instance is according to the related aggregate declarations. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXARRAY_REQUIRED_ELEMENTS | Specifies that all elements in arrays, that are not declared as OPTIONAL, owned by the instance, will be checked for an assigned value, i.e., checked that no unset elements exists. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXAGGREGATE_UNIQUENESS | Specifies that all aggregates owned by the specified instance will be validated for uniqueness violation. Aggregates that have an uniqueness constraints are all SET aggregates, and ARRAY and LIST aggregates that are declared with the optional keyword UNIQUE. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXUNSET_DERIVE_ATTRIBUTES | Specifies that warnings will be issued if unset derived attributes are found. This option is not applicable when the argument <ruleSchemaId> is set unequal zero. |
XPXOUTPUT_STEPID | Specifies that the stepID corresponding to the instanceID will be written to the validation report when the actual correspondence exists in a STEP Identifier model. |
XPXFULL_OUTPUT | Specifies that all available information about the source of the errors will be recorded in the diagnostic report from this command. |
XPXSTOP_ON_FIRST_ERROR | Specifies that the validation process should terminate when the first error is detected. |
Example
...
Code Block | ||
---|---|---|
| ||
<Missing Example> |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|