edmiValidateInstancesWithParameters
EdmiError edmiValidateInstancesWithParameters(SdaiAggrOrInstance aggrOrInstanceId, SdaiInstance instances[], SdaiString diagnosticFile, SdaiInteger options, SdaiRuleSchema ruleSchemaId, SdaiString userOutputFile, SdaiInstance *validationErrorId SdaiPrimitiveType *returnValueDatatype, void *returnValue, SdaiInteger numberOfParameters, /* For each user parameter: [SdaiPrimitiveType parameterDataType, parameterValue] */ .... );
<Description>
Arguments
1 | Type | Name | Comment |
2 | SdaiAggrOrInstance | aggrOrInstanceId |
|
3 | SdaiInstance | instances[] |
|
4 | SdaiString | diagnosticFile | Specifies the file name for diagnostic information generated by this function. If no file name is supplied, i.e. the <diagnosticFile> argument is set to NULL, all diagnostic information will be written to the EDMinterface current output device. The EDMinterface current output device can be defined by the edmiDefineOutputFunction operation. No diagnostics report will be produced by this function when the NO_PRINT_OUTPUT option is set. |
5 | SdaiInteger | options | Specifies the enabled options used by the EDMmodelChecker in the current invocation. The <options> value is specified as a bitwise OR between the enabled options. All option names are defined in the header file sdai.h . |
6 | SdaiRuleSchema | ruleSchemaId | A numeric ruleSchemaID that uniquely identifies the rule schema instance in the EDMdatabase that defines the global rule specified in the <globalRuleName> argument. The specified global rule must be defined in the dictionary model (Express schema) that is the underlying schema of the specified data model <modelId> if the <ruleSchemaId> is set to zero. The ruleSchemaID can be retrieved by the edmiGetRuleSchema operation. |
7 | SdaiString | userOutputFile | Specifies the name of a file that will be used to receive the result of executing the xpxPrintf and xpxOutputValue function in the actual global rule. The specified file can be an existing file or the name of a file that will be created by the EDMmodelChecker. The default file extension is ".txt". The output of the xpxPrintf and xpxOutputValue function in the actual global rule will be written to the EDMinterface current output device when the <userOutputFile> is set to NULL. The EDMinterface current output device can be defined by the edmiDefineOutputFunction operation. |
8 | SdaiInstance | validationErrorId | The address of a variable of type SdaiInstance that will receive a numeric instanceID that uniquely identifies an instance of type validation_error in a population of the EDM_Validation_Result_Schema that contains all details of the violations detected in the last invocation of the EDMmodelChecker. No population of the EDM_Validation_Result_Schema will be produced when the <validationErrorId> argument is NULL on input. |
9 | SdaiPrimitiveType | returnValueDataType | Address of a variable of type SdaiPrimitiveType that is used both as an input argument and an output argument:
|
10 | void | returnValue | Address of variable that will receive the value from the actual validation process. The actual value must be specified by invoking the xpxReturnValueToCaller procedure in the validation process in the EDMexpressVM. |
11 | SdaiInteger | numberOfParameters | Specifies the number of parameters supplied in the actual invocation of the operation. For each parameter the following two arguments must be specified in this order: |
12 | SdaiPrimitiveType | parameterDataType | The data type of the actual parameter value specified as a SdaiPrimitiveType value. |
13 | parameterValue | Actual parameter value. |
Return Value
Options
Option | Comment | |
---|---|---|
1 | FULL_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: |
2 | GLOBAL_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. |
3 | LOCAL_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. |
4 | INVERSE_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. |
5 | UNIQUENESS_RULES | Specifies that all Uniqueness rules defined for the actual instance will be validated. |
6 | REQUIRED_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. |
7 | ATTRIBUTE_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. |
8 | AGGREGATE_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. |
9 | AGGREGATE_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. |
10 | ARRAY_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. |
11 | AGGREGATE_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. |
12 | UNSET_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. |
13 | OUTPUT_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. |
14 | FULL_OUTPUT | Specifies that all available information about the source of the errors will be recorded in the diagnostic report from this command. |
15 | STOP_ON_FIRST_ERROR | Specifies that the validation process should terminate when the first error is detected. |
Example
<example>
See also
Filter by label
There are no items with the selected labels at this time.