edmiReadStepFileEx

EdmiError edmiReadStepFileEx (SdaiString   repositoryName,
                                SdaiString   modelName,
                                SdaiString   headerModelRepositoryName,
                                SdaiString   headerModelName,
                                SdaiString   stepFile,
                                SdaiString   logFile,
                                SdaiString   schemaName,
                                SdaiString   shortNamesFile,
                                SdaiInteger  options,
                                SdaiModel    *modelId, 
                                SdaiInteger  *nbWarnings,
                                SdaiInteger  *nbErrors,
                                EdmiError    *sdaiError);

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 edmiWriteStepFile function. The edmiImportStepFile operation is very similar to the edmiReadStepFile operation except that arguments that is no longer valid for the read STEP file operation are omitted and some optional arguments are given a default value in the edmiImportStepFile operation.

EXPRESS
SCHEMA header_section_schema;
   TYPE SCHEMA_NAME = STRING (256); END_TYPE; 

   ENTITY file_description; 
      description : LIST OF STRING (256); 
      implementation_level : STRING (256); 
   END_ENTITY; 
 
   ENTITY file_name; 
      name : STRING (256); 
      time_stamp : STRING (256); 
      author : LIST OF STRING (256); 
      organization : LIST OF STRING (256); 
      preprocessor_version : STRING (256); 
      originating_system : STRING (256); 
      authorisation : STRING (256); 
   END_ENTITY; 
 
   ENTITY file_schema; 
      schema_identifiers : LIST OF SCHEMA_NAME; 
   END_ENTITY; 
 
END_SCHEMA;

Arguments


1TypeNameComment
2SdaiString

repositoryName

The name of the data repository that will contain the new created model, or that contains the existing model when the option [KEEP_EXISTING_MODEL] or [DELETE_EXISTING_MODEL] is specified. Repository names are case sensitive.

3SdaiString

modelName

The name of the edmModel to be created and populated with data from the specified STEP file. When creating a new model, the model must be given a name that is unique within the repository. The model name must start with a letter and continue with a sequence of alpha numeric characters and underscore. Model names are case sensitive. <modelName> can be an existing edmModel when one of the options [KEEP_EXISTING_MODEL] or [DELETRE_EXISTING_MODEL] are specified

4SdaiString

headerModelRepositoryName

The name of the data repository that will contain the imported header model. Repository names are case sensitive.

5SdaiString

headerModelName

The name of the STEP Header model to be created and populated. The model must have a name that is unique within the data repository. The model name must start with a letter and continue with a sequence of alpha numeric characters and underscore. Model names are case sensitive. The default name convention used for STEP Header models in EXPRESS Data Manger is "<modelName>_HeaderModel". This convention makes it easy to find the STEP Header model corresponding to a particular data model and vice versa. When this argument is empty, i.e. <headerModelName> = NULL, no STEP Header model will be created.

6SdaiString

stepFile

The name of the ISO-10303 Part21 file that contains the STEP Physical File to be read by this function. The default file extension is .stp

7SdaiString

logFile

The name of a file that will receive all logging output from the imported STEP file. The log will be a copy of the specified STEP file with a line sequence number added at the start of each line. In addition all warnings and errors detected during the read operation will be written to the location within the file where the warning and/or error condition occurred. An empty argument, i.e. <logFileName> = NULL means that no log file will be generated. This argument is only effective when the [LOG_TO_FILE] option is set.

8SdaiString

schemaName

The name of the Express schema that defines the structure of the data within the Data Section of the actual STEP file. This name is found in the attribute FILE_SCHEMA.SCEMA_IDENTIFIERS in the Header Section of the STEP file. The schema will be used as the underlying schema of the new edmModel resulting from this function. Therefore the Express schema must exist as a dictionary model in the EDMdatabase when the edmiWriteStepFileEx function is invoked. If, for any reason, the schema already exist within the EDMdatabase with another name, this argument may be used to overrule the schema name in the Header Section of the STEP file. Otherwise leave this argument empty. Express schema names are case insensitive.

9SdaiString

shortNamesFile

The name of the file containing mappings between full entity names and their corresponding unique short names. For each STEP AP, a short names file is provided by ISO TC184/SC4 

10SdaiInteger

options

The options that will be used in the execution of the edmiReadStepFileEx function. The options value should be specified as a bitwise OR between the options to be enabled. All available options are defined in the header file sdai.h. See below for a detailed description of the available options.

11SdaiModel

modelId

Variable that will receive the modelId of the populated edmModel.

12SdaiInteger

nbWarnings

Variable that will receive the number of warnings resulting from reading the STEP file.

13SdaiInteger

nbErrors

Variable that will receive the number of errors encountered while reading the STEP file.

14EdmiError

sdaiError

Variable that will receive the EDMinterface error code when the edmiReadStepFileEx function encounters a problem with the communication with the EDMserver.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

Options


 

  OptionComment
1

ADD_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.

2

COMPRESSED_FILE  

Same as ZIPPED_FILE

3

CONFORMANCE_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 edmiReadStepFile function.

4

CONFORMANCE_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 edmiReadStepFile function.

5

DIS_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 edmiReadStepFile function.

6

DELETING_EXISTING_MODEL

When the specified <modelName> exists, it well be deleted and recreated at the invocation of the edmiReadStepFile operation.

7

DELETE_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.

8

DELETE_INSTANCES_WITH_REFS

 

9

EXCLUDE_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.

10

HEADER_MODEL_ONLY

 

11

INSTANCES_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.         

12

INSTANCES_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.

13

INSTANCES_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
are legal to be able in  the same stepRead operation.

14

INSTANCES_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
are legal to be able in  the same stepRead operation.

15

ISO_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

16

ISO_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.

17

LOG_ERRORS_AND_WARNINGS_ONLY

Limits the log to only include logging of instances related to errors and warnings.

18

LOG_TO_FILE

Logged information will be stored in a file specified by the <Log file> argument.

19

LOG_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.

20

KEEP_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.

21

NO_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.

22

NOT_CLOSE_MODEL

The data model will not be closed by the edmiReadStepFile 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.

23

NO_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:

  1. The built in function USEDIN,
  2. The EDMinterface operations: edmiUsedIn, edmiUsedInBN, and edmiGetInstanceReferences
  3. The ExpressX function xpxGetInstanceReferences
    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.
24

ONE_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.

25

ONLY_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.
    

26

OPEN_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.

27

PARSE_ONLY

The specified STEP file will be parsed only, i.e. only checked for syntactical correctness, no data will be stored in the EDMdatabase.

28

PRE_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.

29

STEP_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.

30

UNPACKED_MODEL

 

31

USER_CONTROLLED_INVERSE

 

32

UTF8_ENCODED_FILE_NAMES

 

33

UTF_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.

34

ZIPPED_FILE

The actual "stepFile" is a "zipped" file.

Example


 

 EdmiError rstat, err;
 SdaiInteger nWrn, nErr;
 SdaiModel modId;
 . . .
 /* Import the ISO10303-21 file */
 if (rstat = edmiReadStepFileEx ("DataRepository", "MyModel", NULL, NULL,
 "c:/data/myP21file.stp", "c:/temp/myP21file.dia", 
 NULL, NULL, DELETING_EXISTING_MODEL|CONFORMANCE_CLASS_2, 
 &modId, &nWrn, &nErr, &err)) { 
 printf("\nError %d in edmiReadStepFileEx: %s", rstat,  
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 . . .
 /* Modify population here */
 . . .
 /* Export the ISO10303-21 file */
 if (rstat = edmiWriteStepFileEx("DataRepository", "myModel", NULL, NULL,
 "c:/data/myP21file.stp", "c:/temp/myP21file.dia", 
 NULL, CONFORMANCE_CLASS_2, 6, &nWrn, &nErr, &err)) { 
 printf("\nError %d in edmiWriteStepFileEx: %s", rstat,  
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 . . .
 error:
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.