...
Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpxReadStepFile (STEPfile, logFile, |
...
sumFile, : STRING;
repositoryName,headerModelName : STRING;
modelName,schemaName : STRING;
shortNamesFile : STRING;
cacheSize, options : INTEGER;
VAR sdaiError : INTEGER)
status : INTEGER;
|
Reads a STEP Physical File into EDMdatabase. Normally the imported data set will be stored in a new data model. Optionally the read data set can be added to an existing data model. The Express schema that defines the structure in the Data Section of the actual STEP file must exist as a dictionary model in EDMdatabase before this function can be successfully executed. The name of this Express schema is found in the attribute FILE_SCHEMA.SCHEMA_IDENTIFIERS in the Header Section of the STEP file. The STEP Physical File format is defined in to ISO 10303-21: Clear text encoding of the exchange structures. A STEP Physical File is also referred to as a Part 21 file. This is one of the implementation forms of ISO 10303, and can be used to exchange data between two EDMdatabases or between the EDMdatabase and any application that conforms to ISO 10303-21. The STEP Physical File format is also suitable for long time archiving of data. When the option KEEP_STEP_IDENTIFIERS is enabled, a STEP Identifier model is created and connected to the data model created by this operation. The purpose of this STEP Identifiers model is to hold the correspondence between the entity instance identifiers on the actual STEP file (stepID) and the related instanceID in the EDMdatabase. No STEP Identifiers model can be created when the ADD_TO_EXISTING_MODEL option is enabled.
The STEP Identifiers model will be opened for read only access when the related data model is opened, and the STEP Identifiers model will be deleted when the connecting data model is deleted. The STEP Identifiers model can also be handled as an individual model with respect to the EDMdatabase operations. A STEP Physical File can be created by the xpxWriteStepFile and xpxWriteStepFileEx functions.
Arguments
...
1 | Type | Name | Comment |
2 | STRING | STEPfile | The name of the actual STEP Physical File to read into the database. |
3 | STRING | logFile |
...
The name of the file where logging from the xpxReadStepFile function will be recorded in case logging is enabled. This argument can be set to an empty string or indeterminate when no logging should be performed. | ||
4 | STRING | sumFile |
...
Name of the file where a summary of the STEP file read operation will be recorded. This argument can be set to an empty string or indeterminate when no summary is wanted. | ||
5 | STRING | repositoryName |
...
Name of the repository where the new created model will be located. | ||
6 | STRING | headerModelName |
...
A STEP Physical File consist of a Header Section and a Data Section. If a sdai_model of the Header Section should be created and populated during the xpxReadStepFile operation, then the headerModelName specifies the name of this sdai_model in the database. This model will be located in the repository specified by the repositoryName argument. This argument can be set to an empty string or indeterminate when no creation and population of a STEP Physical File Header Section model is wanted. | ||
7 | STRING | modelName |
...
The name of the sdai_model that will be created and populated as a result of the xpxReadStepFile function. | ||
8 | STRING | schemaName |
...
The name of the Express schema that describes the Data Section of a STEP Physical File is found in the Header Section of the same STEP Physical File. This schema must exist as a dictionary model in the database before the xpxReadStepFile function can be performed successfully. If the STEP file should be read using an Express schema with another name than specified in the Header Section of the actual STEP file, the argument schemaName is used to specify the name of the Express schema to be used as the underlying schema for the created and populated sdai_model. A dictionary model of this Express schema must exist in the database if the xpxReadStepFile operation should be executed successfully. The argument schemaName can be specified as an empty string or as indeterminate if the schema specified in the Header Section of the actual STEP file should be used. | ||
9 | STRING | shortNamesFile |
...
The name of a file that contains short entity names of the actual schema that defines the data on the STEP file to be read. A STEP file can be written using the entity names specified in the Express schema that defines the sdai model that is mapped to the STEP file, or a STEP file can be written using short entity names. In case the actual STEP file is written using the short entity names, the shortNamesFile argument must specify a file that contains the mapping from short entity names to the entity names defined in the underlying Express schema of the actual sdai model. |
...
10 | INTEGER | cacheSize | This argument can be used to define the size of the cache in the EDMpart21Handler |
...
to influence the performance of the xpxReadStepFile operation. Normally the default value is used. The default value is used when the argument is set to zero. | ||
11 | INTEGER | options |
...
see below | |||
12 | INTEGER | sdaiError | If the xpxReadStepFile operation is terminated due to errors in accessing the database, the argument sdaiError will receive the actual sdaiErrorCode causing the termination of the xpxReadStepFile operation. |
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Option | Comment |
---|---|
XPXADD_TO_EXISTING_MODEL | The imported data set (STEP file) will be added to the existing data model <modelName>. The <modelName> data model must be a model with the required underlying schema ,i.e., the schema specified in the header section of the STEP file or the schema specified in the <schemaName> argument. This option enables incremental population of a data model from STEP files. |
XPXCOMPRESSED_FILE | Same as ZIPPED_FILE |
XPXCONFORMANCE_CLASS_1 | Overrules the mapping method given in the Header Section of the actual STEP file such that the STEP file will be interpret according to ISO 10303-21:1994/TC1 CC1. The options [CONFORMANCE_CLASS_1], [CONFORMANCE_CLASS_2], and [DIS_VERSION] are mutually exclusive, i.e., only one of these options should be activated in one execution of the xpxReadStepFile function |
...
. | |
XPXCONFORMANCE_CLASS_2 | Overrules the mapping method given in the Header Section of the actual STEP file such that the STEP file will be interpret according to ISO 10303-21:1994/TC1 CC2. The options [CONFORMANCE_CLASS_1], [CONFORMANCE_CLASS_2], and [DIS_VERSION] are mutually exclusive, i.e., only one of these options should be activated in one execution of the xpxReadStepFile function. |
XPXDIS_VERSION | Overrules the mapping method given in the Header Section of the actual STEP file such that the STEP file will be interpret according to ISO 10303-21:1994/TC1 DIS version. The options [CONFORMANCE_CLASS_1], [CONFORMANCE_CLASS_2], and [DIS_VERSION] are mutually exclusive, i.e., only one of these options should be activated in one execution of the xpxReadStepFile function. |
XPXDELETING_EXISTING_MODEL | When the specified <modelName> exists, it well be deleted and recreated at the invocation of the xpxReadStepFile operation. |
XPXDELETE_INSTANCE_REFS_ON_DELETE | The sdaiDeleteInstance operation will be legal for instances with references. The references to the actual instances will automatically be deleted when the actual instance is deleted by the sdaiDeleteInstance operation. This option can improve the performance of data manipulation in this model. Normally this option should only be used on "temporarily models", i.e., models that is imported into another system than the persistent EDMdatabase. |
XPXDELETE_INSTANCES_WITH_REFS |
|
XPXEXCLUDE_USER_DEFINED_ENTITIES | All instances of UserDefinedEntities in the actual "stepFile" will be skipped, i.e., these instances will not be populated in the resulting EDMdataModel by the STEPread operation. |
XPXHEADER_MODEL_ONLY |
|
XPXINSTANCES_IN_CONTAINER | All instances created by the actual STEPread operation will be inserted in an EDMcontainer that will be created by the STEPread operation. The actual EDMcontainerId is returned in the "containerId" argument in the actual readStep operation invocation. Only one of the options INSTANCES_IN_MODEL_LOCK_CONTAINER, INSTANCES_IN_MODEL_CONTAINER, INSTANCES_IN_LOCK_CONTAINER, INSTANCES_IN_CONTAINER are legal to be able in the same stepRead operation. |
XPXINSTANCES_IN_LOCK_CONTAINER | All instances created by the actual STEPread operation will be inserted in an EDMlockContainer that will be created by the STEPread operation. The actual EDMlockContainerId is returned in the "containerId" argument in the actual STEPread operation invocation. Only one of the options INSTANCES_IN_MODEL_LOCK_CONTAINER, INSTANCES_IN_MODEL_CONTAINER, INSTANCES_IN_LOCK_CONTAINER, INSTANCES_IN_CONTAINER are legal to be able in the same stepRead operation. |
XPXINSTANCES_IN_MODEL_LOCK_CONTAINER | All instances created by the actual STEPread operation will be inserted in an EDMmodelLockContainer that will be created by the STEPread operation. The actual EDMmodelLockContainerId is returned in the "containerId" argument in the actual readStep operation invocation. Only one of the options INSTANCES_IN_MODEL_LOCK_CONTAINER, INSTANCES_IN_MODEL_CONTAINER, INSTANCES_IN_LOCK_CONTAINER, INSTANCES_IN_CONTAINER |
XPXINSTANCES_IN_MODEL_CONTAINER | All instances created by the actual STEPread operation will be inserted in an EDMmodelContainer that will be created by the STEPread operation. The actual EDMmodelContainerId is returned in the "containerId" argument in the actual readStep operation invocation. Only one of the options INSTANCES_IN_MODEL_LOCK_CONTAINER, INSTANCES_IN_MODEL_CONTAINER, INSTANCES_IN_LOCK_CONTAINER, INSTANCES_IN_CONTAINER |
XPXISO_LATIN_1_STRING_ENCODING | The STRING data types in the resulting new EDMdataModel will be encoded in ISO-LATIN-1 style string encoding. Only one of the options UTF_8_STRING_ENCODING and ISO_LATIN_1_STRING_ENCODING are legal in the same STEPread operation. The ISO-LATIN-1 style string encoding is the default string encoding style in the resulting EDMdataModel, i.e., when neither UTF_8_STRING_ENCODING nor ISO_LATIN_1_STRING_ENCODING is specified. This option has no effect when the option ADD_TO_EXISTING_MODEL is used |
XPXISO_8859_1_STRING_ENCODING | The STRING data types in the resulting new EDMdataModel will be encoded in ISO-LATIN-1 style string encoding. Only one of the options UTF_8_STRING_ENCODING and ISO_LATIN_1_STRING_ENCODING are legal in the same STEPread operation. The ISO-LATIN-1 style string encoding is the default string encoding style in the resulting EDMdataModel, i.e., when neither UTF_8_STRING_ENCODING nor ISO_LATIN_1_STRING_ENCODING is specified. This option has no effect when the option ADD_TO_EXISTING_MODEL is used. |
XPXLOG_ERRORS_AND_WARNINGS_ONLY | Limits the log to only include logging of instances related to errors and warnings. |
XPXLOG_TO_FILE | Logged information will be stored in a file specified by the <Log file> argument. |
XPXLOG_TO_STDOUT | Logged information will be written to the EDMinterface current output device. The EDMinterface current output device can be defined by the edmiDefineOutputFunction operation. |
XPXKEEP_STEP_IDENTIFIERS | A STEP Identifier model will be created and connected to the data model created by this operation. The STEP Identifier model will keep the correspondence between the STEP file entity instances (stepID) and the EDMdatabase instanceID that uniquely identifies the same instance. |
XPXNO_STRING_ENCODING | Specifies that the actual STEP file has no encoding of SdaiString data values, hence no decoding will take place during the read operation. The ISO 10303-21 specifies that all characters in a STRING data type that have an ASCII value less than 32 or greater than 126 should be encoded in a STEP file and hence decoded when reading the STEP file into an EDMdatabase. |
XPXNOT_CLOSE_MODEL | The data model will not be closed by the xpxReadStepFile operation, i.e., the calling application can start using the imported model immediately without opening the model. This option can improve the performance of data manipulation in this model. Normally this option should only be used on "temporarily models", i.e., models that is imported into another system than the persistent EDMdatabase. |
XPXNO_INSTANCE_REFERENCES | No "instance references tables" will be created and maintained in the actual model. The following operations will not work on the actual data model when this option is enabled:
|
XPXONE_FILE_STEP_FILE_PACKAGE | The actual "stepFile" to read is an EDMstepFilePackage consisting of one single file.An EDMstepFilePackage is an EDM proprietary extension of the iSO 10303-21 to enable the mapping of the EDM proprietary data types EDMfile and EDMblob to an P21 file. An EDMstepFilePackage can consist of one single file or a collection of files. |
XPXONLY_USER_DEFINED_ENTITIES | Only instances of UserDefinedEntities in the actual "stepFile" will be populated in the actual EDMdataModel by the STEPread operation. All other instance types on the actual "stepFile" will be skipped. |
XPXOPEN_MODEL_FOR_LOCAL_READ_WRITE | This option opens the actual resulting EDMdataModel for LocalReadWrite mode, i.e., this model will not be updated on the EDMdatabase controlled by the actual running EDMserver. The purpose of this option is to implement a method for "local temporary models" in an EDMserver system. This options has only effect in an EDMserver system. |
XPXPARSE_ONLY | The specified STEP file will be parsed only, i.e. only checked for syntactical correctness, no data will be stored in the EDMdatabase. |
XPXPRE_PARSE_FILE | Specifies that the actual import process will be performed in two passes, i.e., the actual STEP file will be read twice. This option may increase performance for STEP files with many forward references. |
XPXSTEP_FILE_PACKAGE | The "stepFile" to read in the actual STEPread operation is an EDMstepFilePackage. An EDMstepFilePackage is an EDM proprietary extension of the iSO 10303-21 to enable the mapping of the EDM proprietary data types EDMfile and EDMblob to an P21 file. |
XPXUNPACKED_MODEL |
|
XPXUSER_CONTROLLED_INVERSE |
|
XPXUTF8_ENCODED_FILE_NAMES |
|
XPXUTF_8_STRING_ENCODING | The STRING data types in the resulting new EDMdataModel will be encoded in UTF-8 style string encoding. Only one of the options UTF_8_STRING_ENCODING and ISO_LATIN_1_STRING_ENCODING are legal in the same STEPread operation. This option has no effect when the option ADD_TO_EXISTING_MODEL is used. |
XPXZIPPED_FILE | The actual "stepFile" is a "zipped" file. |
Example
...
Code Block | ||
---|---|---|
| ||
<Missing Example> |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|