Introduction
This chapter provides an alphabetical reference to the functions provided by the SDAI C programming library.
Organization
Each function's description begins with the function's prototype. After the prototype, there is a description of the function's purpose and its parameters. This section also describes any side effects that the function may have, and what value, if any, is returned by the function.
The Errors section lists the errors, and gives a brief explanation of what conditions can cause each error to be flagged.
The Example section shows how the code may be used. Unless otherwise indicated, this example is neither a complete program nor function, but rather an outline which briefly demonstrates how the function may be used.
The See Also section provides cross reference to related functions in the SDAI binding, provides a reference to the clauses in the SDAI standard (both Part 22 and Part 24) which define the function.
Conformance Class
The SDAI implementation described in this document supports the following conformance classes:
- Level 2 of transaction support
- Level 2 of expression evaluation support
- Level 1 of event recording support
- Level 1 of scope support
- Level 1 of domain equivalence support.
This means that the this implementation provides the support required by implementation class 1 and class 2 except for scope support. It conforms to Implementation Class 4, with the exception of session recording support.
The following table is derived from Table 7 from ISO 10303-22. It shows what functionality is required by which implementation class (Y means the functionally is required, N means it is not; D or E means that a subset of the functionality is required). The table cells that are highlighted are identify the functionality that is present or exceeded in this implementation.
Operation | Implementation Class | ||||||
---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 | |
Open Session | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Record error | N* | N* | N* | Y | Y | Y | Y |
Start event recording | N* | N* | N* | Y | Y | Y | Y |
Stop event recording | N* | N* | N* | Y | Y | Y | Y |
Close session | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Open repository | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Start transaction read-write access | N* | N* | N* | N* | Y | Y | Y |
Start transaction read-only access | N* | N* | N* | N* | Y | Y | Y |
Commit | N* | N* | N* | N* | Y | Y | Y |
Abort | N* | N* | N* | N* | Y | Y | Y |
End transaction access and commit | N* | N* | N* | N* | Y | Y | Y |
End transaction access and abort | N* | N* | N* | N* | Y | Y | Y |
Create non-persistent list | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Delete non-persistent list | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
SDAI query | N* | N* | Y | N* | N* | Y | Y |
Create SDAI -model | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Create schema instance | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Close repository | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Delete schema instance | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Rename schema instance | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Add SDAI-model | D* | D* | Y* | D* | D* | Y* | Y* |
Remove SDAI-model | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Validate uniqueness rule | N* | Y* | Y* | Y* | Y* | Y* | Y* |
Validate instance reference domain | N* | Y* | Y* | Y* | Y* | Y* | Y* |
Validate schema instance | N* | Y* | Y* | Y* | Y* | Y* | Y* |
Is validation current | N* | Y* | Y* | Y* | Y* | Y* | Y* |
SDAI -model operations (not Save Undo, get dictionary) | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Get entity definition | N* | Y* | Y* | Y* | Y* | Y* | Y* |
Save and Undo | N* | N* | N* | Y* | N* | N* | N* |
Scope operations | N* | Y | Y | N* | N* | N* | Y |
Get complex entity definition | N* | N* | N* | N* | N* | N* | Y* |
Is subtype of | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Is SDAI subtype of | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Is domain equivalent with | N* | N* | Y | N* | Y | Y | Y |
Get population dependent bound | N* | E | E | E | E | E | Y |
Get attribute | E* | E* | E* | E* | E* | E* | Y |
Get instance type | N* | Y* | Y* | Y* | Y* | Y* | Y* |
Entity instance operations | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Find entity instance users | N* | N* | Y* | N* | N* | Y* | Y* |
Find entity instance usedin | N* | N* | Y* | N* | N* | Y* | Y* |
Get attribute value bound | E | E | E | E | E | E | Y |
Find roles played | N* | N* | N* | N* | N* | N* | Y* |
Find data types | N* | N* | N* | N* | N* | N* | Y* |
Copy application instance | D* | D* | Y | D* | D* | Y | Y |
Application instance operations except validation and label | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Application instance operations: persistent label operations | N* | N* | N* | Y* | Y* | Y* | Y* |
Get description | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Application instance operations: simple validation | N* | Y* | Y* | Y* | Y* | Y* | Y* |
Application instance operations: validation | N* | E* | E* | E* | E* | E* | Y* |
Entity and application instance bound related aggregate operations | N* | E* | E* | E* | E* | E* | Y* |
All entity and application instance non-bound related aggregate operations | Y* | Y* | Y* | Y* | Y* | Y* | Y* |
Unimplemented Functions
There are a number of functions defined in Part 22, but not documented here. These functions are not included in the conformance class that this SDAI implementation provides, and will generate the error FN_NAVL (function is not available) if they are called. These unimplemented functions consist of the following:
sdaiAddToExportList(); sdaiAddToScope(); sdaiBreakTrx(); sdaiEndTrx(); sdaiGetAggrElementBoundByIndex() sdaiGetAggrElementBoundByItr(); sdaiGetAttrBound(); sdaiGetAttrBoundBN(); sdaiGetExportList(); sdaiGetLowerBound(); sdaiGetOwnedScopeInstances(); sdaiGetScope(); sdaiGetScopeOwner(); sdaiGetUpperBound() sdaiIsDeqWith(); sdaiIsDeqWithBN(); sdaiIsRecordingOn(); sdaiIsScopeOwner(); sdaiIsValidationCurrent(); sdaiQuery(); sdaiRecordEvent(); sdaiReindexArray(); sdaiRemoveFromExportList(); sdaiRemoveFromScope(); sdaiScopedCopyInSameModel(); sdaiScopedCopyToOtherModel(); sdaiScopedDelete(); sdaiSetEventRecording(); sdaiStartTrx(); sdaiValidateScopeReferenceRestrictions();
sdaiAccessModel()
SdaiModel sdaiAccessModel( SdaiModel model, SdaiAccessMode mode );
The sdaiAccessModel() function makes the instances in an SDAI model available for access as either real-only or read-write. Until this function is called, any attempt to access the contents of a model results in an error. The parameter mode must be specified as sdaiRW (for read-write) or sdaiRO (for read only).
This function causes model.contents, model.underlying_schema andmodel.mode to be set. This function returns the parameter model unless there was an error in which case it returns sdaiNULL.
Errors
sdaiSS_NOPN session is not open sdaiMO_NEXS NULL or invalid model sdaiRP_NOPN repository not open sdaiMX_RO model is already open in read-only mode sdaiMX_RW model is already open in read-write mode
Example
SdaiModel mod; sdaiAccessModel (mod, sdaiRW);
See Also
sdaiAccessModelBN();sdaiEndModelAccess(); ISO 10303-22-10.7.3, 10.7.6; ISO 10303-24-6.5.3
sdaiAccessModelBN()
SdaiModel sdaiAccessModelIBN( SdaiRep repository, SdaiString modelName, SdaiAccessMode mode );
The sdaiAccessModelBN() function makes the instances in an SDAI model available for access as either real-only or read-write. Until this function is called, any attempt to access the contents of a model will result in an error.
repository
- the repository containing the model to be accessed. This repository must be opened for access.
modelName
- The name of the model to be opened. This can be obtained by examining repository.contents.models.
mode
- sdaiRW (for read-write) or sdaiRO (for read only) access
This function causes model.contents, model.underlying_schema and model.mode to be set. This function returns the model accessed unless there was an error in which case it returns sdaiNULL.
Errors
sdaiSS_NOPN session is not open sdaiMO_NEXS NULL or invalid model sdaiRP_NOPN repository not open sdaiRP_NEXS NULL repository {this error is not in p22/24} sdaiMX_RO model is already open in read-only mode sdaiMX_RW model is already open in read-write mode
Example
SdaiModel mod; SdaiSession sess = sdaiOpenSession(); SdaiRep rep = sdaiOpenRepositoryBN (sess, "standard_3.0"); mod = sdaiAccessModelBN (rep, "data", sdaiRW);
See Also
sdaiAccessModel(); sdaiEndModelAccess(); ISO 10303-22-10.7.4, 10.7.6; ISO 10303-24-6.5.3
sdaiAdd()
void sdaiAdd( SdaiUnorderedAggr unorderedAggr, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiAdd() function adds a value to an unordered aggregate. The valueType parameter identifies the type of the value parameter and should be sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiBINARY, sdaiENUM, sdaiINSTANCE, sdaiAGGR or sdaiADB.
Errors
sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal or is not unordered sdaiMX_NRW model is not writable sdaiSS_NOPN session is not open sdaiVT_NVLD value type cannot be converted to type of aggregate
See Also
ISO 10303-22-10.14.1; ISO 10303-24-6.12.1
sdaiAddModel()
void sdaiAddModel( SdaiSchemaInstance schemaInstance, SdaiModel model );
The sdaiAddModel() function adds a new model to a schema instance.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiMX_NDEF model not open
See also
ISO 10303 - 22- 10.6.3; ISO 10303 - 24- 6.4.3
sdaiAddModelBN()
void sdaiAddModelBN ( SdaiSchemaInstance schemaInstance, SdaiRep repository, SdaiString modelName );
The sdaiAddModelBN() function adds a model to an existing schema instance. The model is identified by name in a repository.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist sdaiMO_NEXT model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiMX_NDEF model not open
Example
sdaiAddModelBN (si, rep, "aModel");
See Also
ISO10303-22-10.6.3; ISO10303-24-6.4.3
sdaiBeginning()
void sdaiBeginning( SdaiIterator iterator );
The sdaiBeginning() function moves an iterator to the beginning of the aggregate. The current value of the iterator is then unset. The next sdaiNext() call will set the iterator to the aggregate's first element.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NEXS aggregate does not exist or is empty
See Also
sdaiNext(); ISO 10303-22-10.12.5; ISO 10303-24-6.10.5
sdaiCloseRepository()
void sdaiCloseRepository( SdaiRep repository, );
The sdaiCloseRepository() function closes a repository and all of the models contained in it. Any further attempts to access the repository will generate errors, and any attempt to access any instance, in any model in the closed repository is undefined.
Errors
sdaiRP_NEXS sdaiNULL repository sdaiRP_NOPN repository not open
See Also
ISO 10303-22-10.5.3; ISO 10303-24-6.3.3
sdaiCloseSession()
void sdaiCloseSession( SdaiSession session );
The sdaiCloseSession() function ends the SDAI session. No further SDAI operations may be performed after a session is closed.
This function takes a parameter session, which identifies the session to be closed. This parameter should be the return value from the most recent call to sdaiOpenSession().
Errors
sdaiSS_NOPN : the session was not open.
Example
SdaiSession sess; . . . sess = sdaiOpenSession(); . . /* SDAI Operations here */ . sdaiCloseSession(sess);
See Also
ISO 10303-22-10.4.5; ISO 10303-24-6.2.4
sdaiCreateADB()
SdaiADB sdaiCreateADB( SdaiPrimitiveType valueType, <TYPE> value );
The sdaiCreateADB() function creates an Attribute Data Block (ADB). An ADB is a typed union which can contain any SDAI data type. The Part 22 specification does not permit an ADB to be passed to this function, however, this implementation will permit it, copying the type and value of the ADB into the newly created ADB.
The parameter valueType identifies the type of parameter value, and should be one of the following: sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiBINARY, sdaiENUM, sdaiINSTANCE, sdaiAGGR, or sdaiADB. The value parameter identifies the data to be stored in the new ADB.
This function returns the handle of the newly created ADB. This ADB should be freed by calling sdaiDeleteADB() after you are finished using it.
Errors
sdaiSS_NOPN session is not open sdaiVT_NVLD valueType is not a legal type for this function.
Example
SdaiADB adb1, adb2, adb3; SdaiInstance inst; adb1 = sdaiCreateADB (sdaiINTEGER, 12); adb2 = sdaiCreateADB (sdaiSTRING, "String in an ADB"); adb3 = sdaiCreateADB (sdaiINSTANCE, inst);
See Also
sdaiCreateEmptyADB(); sdaiDeleteADB(); ISO 10303-24-6.2.12.1
sdaiCreateAggr()
SdaiAggr sdaiCreateAggr( SdaiAppInstance instance, SdaiExplicitAttr attribute );
The sdaiCreateAggr function() creates a new, empty aggregate as the value of an attribute in an instance. This function is used to set attributes that have aggregate slot types.
This function returns the newly created aggregate.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiAT_NDEF NULL attribute sdaiED_NVLD entity object is not an entity sdaiVA_NSET attribute is unset sdaiAT_NVLD attribute is not an aggregate
See Also
ISO 10303-22-10.11.5; ISO 10303-24-6.9.6
sdaiCreateAggrADB()
SdaiAggr sdaiCreateAggrADB ( SdaiAppInstance instance, SdaiExplicitAttr attr, SdaiADB block );
The sdaiCreateAggrADB() function creates a new, empty aggregate as the value of an attribute. This function is used to set the values of attribute that have aggregate types. The block parameter is used to identify the type of the attribute in the event that it is a SELECT.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiAT_NDEF NULL attribute sdaiED_NVLD entity object is not an entity sdaiVA_NSET attribute is unset sdaiAT_NVLD attribute is not an aggregate
See Also
ISO 10303-24-6.9.6; ISO 10303-22-10.11.5
sdaiCreateAggrBN()
SdaiAggr sdaiCreateAggrBN( SdaiAppInstance instance, SdaiString attributeName );
The sdaiCreateAggr() function creates a new, empty aggregate as the value of an attribute in an instance. The parameter attributeName identifies the attribute where the aggregate is created.
This function returns the newly created aggregate.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiAT_NDEF NULL attribute sdaiED_NVLD entity object is not an entity sdaiVA_NSET attribute is unset sdaiAT_NVLD attribute is not an aggregate sdaiED_NDEF entity definition NULL or not defined
See Also
ISO 10303-22-10.11.5; ISO 10303-24-6.9.6
sdaiCreateAggrADBBN()
SdaiAggr sdaiCreateAggrADBBN ( SdaiAppInstance instance, SdaiString attributeName, SdaiADB adb );
The sdaiCreateAggrBNADB() function creates a new, empty aggregate as the value of an attribute. This function is used to set the values of attribute that have aggregate types. The block parameter is used to identify the type of the attribute in the event that it is a SELECT.
Note
In past releases, this function was named sdaiCreateAggrBNADB(). This function was omitted from earlier drafts of Part 24, and when it was added the name was changed to be is sdaiCreateAggrADBBN().
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiAT_NDEF NULL attribute sdaiED_NVLD entity object is not an entity sdaiVA_NSET attribute is unset sdaiAT_NVLD attribute is not an aggregate
See Also
ISO 10303-24-6.9.6; ISO 10303-22-10.11.5
sdaiCreateComplexInstance()
SdaiAppInstance sdaiCreateComplexInstance( SdaiModel model, SdaiNPL entityList );
The sdaiCreateComplexInstance() function creates an instance of a complex (AND-OR) entity. The entity must be in the working set for the compiled EXPRESS schema. The entityList parameter is an NPL, filled with entity_definition instances, which define the supertypes of the requested complex type.
This is a convenience function which basically calls sdaiGetComplexEntity() followed by sdaiCreateInstance(). If you need to create several complex instances of the same type, it is more efficient to call sdaiGetComplexEntity() once, then use sdaiCreateInstance() to create the individual instances.
This function returns the handle of the newly created instance. If there was an error, sdaiNULL is returned.
Errors
sdaiSS_NOPN session not open sdaiED_NDEF NPL is not valid or NULL or list is empty, entity not in schema sdaiED_NVLD an entity in the list is not valid sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiMX_NRW model not read-write
See Also
sdaiCreateInstance(); sdaiGetComplexEntity(); sdaiCreateComplexInstanceBN(); ISO 10303-24-6.5.10.1
sdaiCreateComplexInstanceBN()
SdaiAppInstance sdaiCreateComplexInstanceBN( SdaiModel model, SdaiInteger nameNumber SdaiString * nameVector );
The sdaiCreateComplexInstanceBN() function creates an instance of a complex (AND-OR) entity by name. The complex entity must be in the working set for the compiled EXPRESS schema. The parameter nameVector is an array of strings (size is the parameter nameNumber) containing entity names for the supertypes of the complex entity.
This is a convenience function which calls sdaiGetComplexEntityBN() followed by sdaiCreateInstance(). If you need to create several complex instances of the same type, it is more efficient to call sdaiGetComplexEntityBN() once, then use sdaiCreateInstance() to create the individual instances.
This function returns the handle of the newly created instance. If there was an error, sdaiNULL is returned.
Errors
sdaiSS_NOPN session is not open sdaiMO_NEXS NULL or invalid model sdaiED_NDEF entity not in EXPRESS sdaiRP_NOPN model's repo is not open sdaiED_NVLD entity is not in model's schema sdaiMX_NRW model not read-write
See Also
sdaiCreateInstance(); sdaiGetComplexEntity(); ISO 10303-24-6.5.10.1
sdaiCreateEmptyADB()
SdaiADB sdaiCreateEmptyADB();
The sdaiCreateEmptyADB() creates an empty Attribute Data Block (ADB). The type and value of the newly created ADB are unset, and any attempt to retrieve the value from the ADB will generate an error until it is populated.
Errors
sdaiSS_NOPN session is not open
Example
SdaiADB adb; adb = sdaiCreateADB();
See Also
sdaiCreateADB(); sdaiDeleteADB(); ISO 10303-24-6.2.12.1
sdaiCreateInstance()
SdaiAppInstance sdaiCreateInstance( SdaiModel model, SdaiEntity entity );
The sdaiCreateInstance() function creates a new instance of the specified entity in a specified model. The entity must be defined in the model's schema or an error is generated.
This function returns a handle to the newly created instance. On error, sdaiNULL is returned.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiED_NDEF entity definition NULL or not defined sdaiED_NVLD entity is not in model's schema
Example
SdaiSession sess; SdaiRep repo; SdaiModel mod; SdaiEntity ent; SdaiAppInstance inst; : sess = sdaiOpenSession(); repo = sdaiOpenRepository (sess, "standard_3.0"); mod = sdaiAccessModelBN (repo, "modname", sdaiRW); : ent = sdaiGetEntity (mod, "cartesian_point"); inst = sdaiCreateInstance (mod, ent);
See Also
sdaiCreateInstanceBN(); ISO 10303-22-10.7.9; ISO 10303-24-6.5.7
sdaiCreateInstanceBN()
SdaiAppInstance sdaiCreateInstanceBN( SdaiModel model, SdaiString entityName );
The sdaiCreateInstanceBN() function creates a new instance in a specified model, of the type whose name is specified by the parameter entityName.
This function returns a handle to the newly created instance. On error, sdaiNULL is returned.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS NULL or invalid model sdaiMX_NDEF model not accessible sdaiED_NDEF cannot find entity or NULL name sdaiRP_NOPN model's repo is not open
Example
SdaiSession sess; SdaiRep repo; SdaiModel mod; SdaiEntity ent; SdaiAppInstance inst; : sess = sdaiOpenSession(); repo = sdaiOpenRepository (sess, "standard_3.0"); mod = sdaiAccessModelBN (repo, "modname", sdaiRW); : : inst = sdaiCreateInstanceBN (mod, "cartesian_point");
See Also
sdaiCreateInstance(); ISO 10303-22-10.7.9; ISO 10303-24-6.5.7
sdaiCreateIterator()
SdaiIterator sdaiCreateIterator( SdaiAggr aggregate );
The sdaiCreateIterator() function creates an iterator over an aggregate specified by parameter aggregate. An iterator is an object that permits access to the elements in an aggregate one element at a time. This is the preferred way to access the elements of an aggregate.
If successful, this function returns the handle of the newly created iterator, otherwise, it returns sdaiNULL.
Errors
sdaiSS_NOPN session not open sdaiAI_NEXS NULL aggregate
See Also
ISO 10303-22-10.12.3; ISO 10303-24-6.10.3
sdaiCreateModel()
sdaiModel sdaiCreateModel( SdaiRep repository, SdaiString modelName, SdaiSchema schema );
The sdaiCreateModel() function creates a new SDAI model. The model is associated with a single repository (repository) and a single schema (schema). The repository must be open, and requested modelName must be unique within the repository. It returns a handle for the new model. The new model will be saved as a STEP Part 21 file, by default.
In this implementation, the sdaiCreateModel() function does not effect any persistent changes (e.g. no files are created) in the repository until the model is saved.
Errors
sdaiSS_NOPN session not open sdaiRP_NEXS repository is sdaiNULL or not repository sdaiRP_NOPN rep not open sdaiMO_DUP model with name already exists sdaiSD_NDEF schema is NULL or in invalid
Example
SdaiSession sess; SdaiRep repo; SdaiSchema sch; SdaiModel mod; sess = sdaiOpenSession (); repo = sdaiOpenRepositoryBN (sess, "standard_3.0"); sch = sdaiGetSchema ("configuration_controlled_design"); mod = sdaiCreateModel (repo, "newmod", sch);
See Also
sdaiOpenRepository(); sdaiOpenRepositoryBN(); sdaiCreateModelBN(); ISO 10303-22-10.5.1; ISO 10303-24-6.3.1
sdaiCreateModelBN()
SdaiModel sdaiCreateModelBN( SdaiRep repository, SdaiString modelName, SdaiString schemaName );
The sdaiCreateModel() function creates a new SDAI model. The model is associated with a single repository (parameter repository) and a single schema. The schema is specified by in the schemaName parameter. The new model will be saved as a STEP Part 21 file, by default.The repository must be open, and requested model name must be unique within the repository.
In this implementation, this function does not effect any persistent changes (e.g. no files are created) in the repository until the model is saved.
Errors
sdaiSS_NOPN session not open sdaiRP_NEXS repository is sdaiNULL or not repository sdaiRP_NOPN rep not open sdaiMO_DUP model with name already exists sdaiSD_NDEF cannot find requested schema
Example
SdaiSession sess; SdaiRep repo; SdaiSchema sch; SdaiModel mod; sess = sdaiOpenSession (); repo = sdaiOpenRepositoryBN (sess, "standard_3.0"); mod = sdaiCreateModel (repo, "newmod", "configuration_controlled_design");
See Also
sdaiOpenRepository(); sdaiOpenRepositoryBN(); sdaiCreateModel(); ISO 10303-22-10.5.1; ISO 10303-24-6.3.1
sdaiCreateNestedAggr()
SdaiAggr sdaiCreateNestedAggr( SdaiUnorderedAggr aggregate );
The sdaiCreateNestedAggr() function creates a new aggregate and adds it to the unordered aggregate of aggregates specified by parameter aggregate.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable
See Also
ISO 10303-22-10.14.2; ISO 10303-24-6.12.2
sdaiCreateNestedAggrADB()
SdaiAggr sdaiCreateNestedAggrADB( SdaiUnorderedAggr aggregate, SdaiADB selaggrInstance );
The sdaiCreateNestedAggr() function creates a new aggregate and adds it to the unordered aggregate specified as parameter aggregate. An ADB is provided to specify the type of the aggregate in case the function is dealing with an aggregate of SELECTs.
This function returns the newly created aggregate, and the ADB contains the newly created aggregate.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable sdaiAB_NEXS NULL ADB
See Also
ISO 10303-22-10.14.2; ISO 10303-24-6.12.2
sdaiCreateNestedAggrByIndex()
SdaiAggr sdaiCreateNestedAggrByIndex( SdaiOrderedAggr aggregate, SdaiAggrIndex index );
The sdaiCreateNestedAggrByIndex() function creates a nested aggregate at a specific index of the aggregate instance specified by parameter aggregate.
This function returns the newly create aggregate instance.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is invalid sdaiMX_NRW model is not writable sdaiIX_NVLD index is invalid
See Also
ISO 10303-22-10.16.2; ISO 10303-24-6.14.2
sdaiCreateNestedAggrByIndexADB()
SdaiAggr sdaiCreateNestedAggrByIndexADB( SdaiOrderedAggr aggregate, SdaiAggrIndex index, SdaiADB selaggrInstance );
The sdaiCreateNestedAggrByIndexADB() function creates a nested aggregate at a specific index of a specified aggregate instance. An ADB is used to specify the type of the aggregate when the members of the aggregate are SELECT typed objects.
This function returns the newly created aggregate instance. The ADB's value is set to the new aggregate.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is invalid sdaiMX_NRW model is not writable sdaiIX_NVLD index is invalid
See Also
ISO 10303-22-10.16.2; ISO 10303-24-6.14.2
sdaiCreateNestedAggrByItr()
SdaiAggr sdaiCreateNestedAggrByItr( SdaiIterator current );
The sdaiCreateNestedAggrByItr() function creates a new nested aggregate in an aggregate instance. The new aggregate replaces the current value at the iterator current.
This function returns the newly created aggregate.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiMX_NRW write permission denied, or iterator is not writable sdaiIR_NSET Iterator not at a valid index sdaiVA_NSET Aggregate cannot be populated with an aggregate
See Also
ISO 10303-22-10.13.1; ISO 10303-24-6.11.1
sdaiCreateNestedAggrByItrADB()
SdaiAggr sdaiCreateNestedAggrByItrADB( SdaiIterator current, SdaiADB selaggrInstance );
The sdaiCreateNestedAggrByItrADB() function creates a new nested aggregate in an aggregate instance. This function should be used instead of sdaiCreatedNestedAggrByItr() when the aggregate consists of SELECT type attributes to disambiguate the type of the new aggregate.
This function returns the newly created aggregate. The new aggregate is also placed into the ADB specified by the parameter selaggrInstance.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiMX_NRW write permission denied, or aggregate is not writable. sdaiIR_NSET Iterator not at a valid index sdaiVA_NSET Aggregate cannot be populated with an aggregate sdaiAB_NEXS NULL ADB
See Also
ISO 10303-22-10.13.1; ISO 10303-24-6.11.1
sdaiCreateNPL()
SdaiNPL sdaiCreateNPL();
The sdaiCreateNPL() function creates a non-persistent list. A non-persistent list is an SDAI aggregate which contains entity instances. The list may not be assigned to an attribute (e.g. with sdaiPutAttrBN) and will be automatically deleted when the session is closed. A non-persistent list (NPL) handle may be used in any SDAI function that takes a list as an argument.
This function returns a handle for a newly created non-persistent list. When you are finished using it, you should call sdaiDeleteNPL() to release the memory consumed by the NPL.
Errors
sdaiSS_NOPN session is not open
Example
SdaiNPL list; : : list = sdaiCreateNPL (); : : sdaiDeleteNPL (list);
See Also
sdaiDeleteNPL;ISO 10303-22-10.4.12;ISO 10303-24-6.2.8
sdaiCreateSchemaInstance()
sdaiSchemaInstance sdaiCreateSchemaInstance( SdaiString schemaInstanceName, SdaiSchema schema, SdaiRep repository );
The sdaiCreateSchemaInstance() function create a new schema instance. A schema instance is a collection of models which may have reference between them. Support for schema instances is very limited in this implementation currently. They are non-persistent, and only a single model may be added to a schema instance. This will be changed when ROSE has full domain interoperability support.
Errors
sdaiSS_NOPN session is not open sdaiSD_NDEF schema not defined
See Also
ISO 10303-22-10.5.1; ISO 10303-24-6.3.2
sdaiCreateSchemaInstanceBN()
SdaiSchemaInstance sdaiCreateSchemaInstanceBN( SdaiString schemaInstanceName, SdaiString schemaName, SdaiRep repository );
The sdaiCreateSchemaInstanceBN() function creates a schema new schema instance. A schema instance is a collection of models (not necessarily of the same underlying schema) which may have references between them.
Support for schema instances is very limited. They are non-persistent and do not support domain equivalence. This will be changed after ROSE has full domain interoperability support
Errors
sdaiSS_NOPN session is not open sdaiSD_NDEF schema not defined
See Also
ISO 10303-22-10.5.1; ISO 10303-24-6.3.2
sdaiDeleteADB()
void sdaiDeleteADB( SdaiADB block, );
The sdaiDeleteADB() function releases the internal storage associated with an Attribute Data Block(ADB). Any attempt to refer to the ADB handle after calling this function is undefined.
Errors
sdaiSS_NOPN session not open sdaiAB_NEXS adb is sdaiNULL
See Also
ISO 10303-24-6.2.12.6
sdaiDeleteInstance()
void sdaiDeleteInstance( SdaiAppInstance instance );
The sdaiDeleteInstance() function deletes the entity instance specified by parameter instance. Any access to the instance after it has been deleted is undefined.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable
See Also
ISO 10303-22-10.11.2; ISO 10303-24-6.9.3
sdaiDeleteIterator()
void sdaiDeleteIterator( SdaiIterator iterator );
The sdaiDeleteIterator() function deletes an iterator. Any attempts to access the iterator after it has been deleted are undefined.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL
See Also
ISO 10303-22-10.12.4; ISO 10303-24-6.10.4
sdaiDeleteModel()
void sdaiDeleteModel( SdaiModel model );
The sdaiDeleteModel() function removes a model and all its contents from memory, then permanently removes the model from its repository.
In the "standard_3.0" filesystem repository, the rose or step file is deleted.
Errors
sdaiSS_NOPN session is not open sdaiMO_NEXS NULL or invalid model
Example
SdaiModel mod; : : sdaiDeleteModel (mod);
See Also
ISO 10303-22-10.7.1; ISO 10303-24-6.5.1
sdaiDeleteNPL()
void sdaiDeleteNPL( SdaiNPL list );
The sdaiDeleteNPL() function deletes a non-persistent list (NPL). After this function is called, the list handle specified is invalid, and any attempts to use it in any other function are undefined.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS a sdaiNULL handle was passed
Example
see sdaiCreateNPL;
See Also
sdaiCreateNPL();ISO 10303-22-10.4.13; ISO 10303-24-6.2.9
sdaiDeleteSchemaInstance()
void sdaiDeleteSchemaInstance( SdaiSchemaInstance schemaInstance );
The sdaiDeleteSchemaInstance() function deletes a specified schema instance from its repository. Any attempt to use a deleted schema instance in undefined.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist
See also
ISO 10303-22-10.6.1; ISO 10303-24-6.4.1
sdaiDeleteSchemaInstanceBN()
void sdaiDeleteSchemaInstanceBN ( SdaiString schemaInstanceName, SdaiRep repository );
The sdaiDeleteSchemaInstanceBN() function deletes a schema instance from a repository. The schema instance to be deleted is identified by a name in an open repository. The schema instance is then permanently removed from both memory and from the repository
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist
Example
sdaiDeleteSchemaInstanceBN ("unwanted", repo);
See Also
ISO 10303-22-10.6.1; ISO 10303-24-6.4.1
sdaiEnd()
void sdaiEnd( SdaiIterator iterator );
The sdaiEnd() function positions an iterator at the end of an aggregate. The iterator's current value in unset. The next call to sdaiPrevious() will set the iterator to the aggregate's last element. This function may only be used on iterators that are traversing ordered aggregates.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD iterator is not rewindable
See Also
sdaiBeginning(); sdaiPrevious(); ISO 10303-22-10.15.2; ISO 10303-24-6.13.2
sdaiEndModelAccess()
void sdaiEndModelAccess( SdaiModel model );
The sdaiEndModelAccess() ends access to a model. The instances in the model may no longer be accessed after this call. Accessing any of the model's instances after this call is undefined. This function does not save the model. If you want the changes to be saved, you must save the model yourself with sdaiSaveChanges() before ending access.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS NULL or invalid model sdaiMX_NDEF model not accessible
Example
SdaiSession sess; SdaiRep repo; SdaiModel mod; : sess = sdaiOpenSession(); repo = sdaiOpenRepository (sess, "standard_3.0"); : mod = sdaiAccessModelBN (repo, "modname", sdaiRO); : sdaiSaveChanges (mod); sdaiEndModelAccess (mod);
See Also
sdaiSaveChanges(); ISO 10303-22-10.7.5, 10.7.7; ISO 10303-24-6.5.5
sdaiErrorQuery()
SdaiErrorCode sdaiErrorQuery();
SdaiErrorQuery() returns the error code of the most recent SDAI function to generate an error, then clears the error code. If a session is not open, the function returns sdaiSS_NOPN. If there is no error, it then returns sdaiNO_ERR.
The error code is not cleared by a successful SDAI function call. The only way to clear the error code is to call sdaiErrorQuery().
Errors
sdaiSS_NOPN session is not open
Example
sdaiErrorQuery () /* clear error code */ sdaiGetAttrBN (inst, "att", sdaiINTEGER, &intval); errcode = sdaiErrorQuery(); /* Get the error code */ newcode = sdaiErrorQuery(); /* new code == sdaiNO_ERR since the error was cleared by the previous line*/
See Also
ISO 10303-24-6.1.3.1;
sdaiFarCopyInstance()
SdaiAppInstance sdaiFarCopyInstance( SdaiAppInstance instance, SdaiModel model );
The sdaiFarCopyInstance() function creates a new instance within the model identified by parameter model, with the same attribute values as the instance specified by parameter instance.
This function returns a handle to the newly created instance.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiSS_NOPN session not open sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiMX_NRW model not read-write
See Also
ISO 10303-22-10.11.2; ISO 10303-24-6.9.2
sdaiFindInstanceRolesOf()
SdaiNPL sdaiFindInstanceRolesOf( SdaiInstance instance, SdaiNPL domain, SdaiNPL resultList );
The sdaiFindInstanceRolesOf() function determines in which attributes a specified instance is referenced as a value from another objects. It then adds the attribute to a specified NPL (resultList).
The domain parameter is ignored by this implementation, int the future it will be used to specify the schema instances over which the search is to be performed.
If an error occurs, this function returns sdaiNULL, otherwise it returns the resultList parameter.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL sdaiED_NDEF NPL is not valid or NULL (is isComplex is true)
See Also
ISO 10303-22-10.10.11; ISO 10303-24-6.8.11
sdaiFindInstanceTypeOf()
SdaiNPL sdaiFindInstanceTypeOf( SdaiInstance instance, SdaiNPL resultList );
The sdaiFindInstanceTypeOf() finds all the types that an instance belongs to. This set of types includes the instance's entity, any supertypes, any SELECT types the entity (or any supertype) belongs to, and any defined types of the selects.
instance
- the instance whose types are to be found
resultList
- an existing NPL to which the types will be appended. This list will have instances of type entity_definition or defined_type added to it.
If there is no error, this function returns the resultList parameter. If an error occurs sdaiNULL is returned.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity sdaiAI_NEXS NPL is not valid or NULL sdaiED_NDEF NPL is not valid or NULL (is isComplex is true)
See Also
ISO 10303-22-10.10.12; ISO 10303-24-6.8.12
sdaiFindInstanceUsedIn()
SdaiNPL sdaiFindInstanceUsedIn( SdaiInstance instance, SdaiAttr role, SdaiNPL domain, SdaiNPL resultList );
The sdaiFindInstanceUsedIn() function finds the instances which reference a specified entity instance from a specified attribute. This function searches the instances in the model containing specified instance.
This function searches all instances of the type that have role as an attribute. If that attribute has value instance (or contains instance, where the attribute is an aggregate), then the instance is added to resultList.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity not Application instance sdaiAI_NEXS NPL is not valid or NULL sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute
See Also
ISO 10303-22-10.10.9; ISO 10303-24-6.8.9
sdaiFindInstanceUsedInBN()
SdaiNPL sdaiFindInstanceUsedInBN( SdaiInstance instance, SdaiString roleName, SdaiNPL domain, SdaiNPL resultList );
The sdaiFindInstanceUsedInBN() function finds the instances which reference a specified entity instance from a specified attribute. This function searches the instance in the model containing specified instance.
This function searches all instances of the type that have rolename as an attribute. If that attribute has value instance (or contains instance, where the attribute is an aggregate), then the instance is added to resultList.
Errors
sdaiSS_NOPN session is not open sdaiEI_NEXS NULL entity not Application instance sdaiAI_NEXS NPL is not valid or NULL sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute sdaiAT_NDEF attribute not found, cannot parse roleName
See Also
ISO 10303-22-10.10.9; ISO 10303-24-6.8.9
sdaiFindInstanceUsers()
SdaiNPL sdaiFindInstanceUsers( SdaiInstance instance, SdaiNPL domain, SdaiNPL resultList );
The sdaiFindInstanceUsers() function finds the instances which reference a specified entity instance. This function searches the instance in the model containing the specified instance. The instance are placed into the specified non-persistent list, resultList.
If the call was successful, this function returns the save value as the parameter resultList. If there is an error, it returns sdaiNULL.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity or entity not SdaiAppInstance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.10.8; ISO 10303-24-6.8.8
sdaiGetADBType()
SdaiPrimitiveType sdaiGetADBType( SdaiADB block );
This function returns the type of the value in an Attribute Data Block.
Errors
SS_NOPN session not open VT_NVLD cannot convert type VA_NSET ADB is empty or sdaiNULL value passed in AB_NEXS adb is sdaiNULL
Example
SdaiADB adb; switch (sdaiGetADBType(adb)) { case sdaiINTEGER: /* value is an integer */ break; case sdaiREAL: /* value is a real */ break; }
See Also
ISO 10303-24-6.2.12.4
sdaiGetADBTypePath()
SdaiString * sdaiGetADBTypePath( SdaiADB block, SdaiInteger * typeNameNumber );
The sdaiGetADBTypePath() retrieves the type path in an ADB. This function returns an array of strings containing the type path. The length of this list is placed in the typeNameNumber parameter. The array will persist until the next call to sdaiGetADBTypePath().
Errors
sdaiAB_NEXS NULL ADB sdaiSS_NOPN session not open
Example
SdaiADB adb; int i; SdaiString * typenames; SdaiInteger nrtypes = 0; sdaiGetADBTypePath (adb, &nrtypes); for (i=0; i<nrtypes; i++) { SdaiString type = typenames[i]; /* Process the type */ }
See Also
ISO 10303-24-6.18
sdaiGetADBValue()
void* sdaiGetADBValue( SdaiADB block, SdaiPrimitiveType valueType, void *value);
The sdaiGetADBValue() function gets, converts and returns the value in an Attribute Data Block (ADB). The block parameter specifies the ADB whose value is being retrieved; valueType is the type of the value being retrieved; value is the address where the function will place the value.
If there is an error, this function returns sdaiNULL, otherwise, if the requested type is a primitive, the function returns the parameter value, otherwise, it returns the handle of the instance or aggregate.
Errors
sdaiVT_NVLD ADB value not converted to the requested type sdaiAB_NEXS ADB is NULL sdaiVA_NSET ADB is empty or value is NULL
Example
SdaiADB adb; SdaiReal val; SdaiInstance instl /* Do something to set the ADB value */ sdaiGetADBValue (adb, sdaiREAL, &val); /* Get an instance value */ sdaiGetADBValue (adb, sdaiINSTANCE, &inst);
See Also
ISO 10303-24-6.2.12.2
sdaiGetAggrByIndex()
void* sdaiGetAggrByIndex( SdaiOrderedAggr aggregate, SdaiAggrIndex index, SdaiPrimitiveType valueType, void *value );
The sdaiGetAggrByIndex() function retrieves the value from an ordered aggregate by index. This function may only be called on arrays and lists. For other types of aggregates, use an iterator.
The valueType specifies the type of the value parameter. This should be sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiBINARY, sdaiENUM, sdaiINSTANCE, sdaiAGGR, or sdaiADB.
If there is an error, this function returns sdaiNULL, otherwise, if the requested type is a primitive, the function returns the parameter value, otherwise, it returns the handle of the instance or aggregate.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is not ordered sdaiVT_NVLD type is invalid sdaiIX_NVLD bad index
See Also
ISO 10303-22-10.15.1; ISO 10303-24-6.13.1
sdaiGetAggrByIterator()
void* sdaiGetAggrByIterator( SdaiIterator iterator, SdaiPrimitiveType valueType, void *value );
The sdaiGetAggrByIterator() function returns the current element from an iterator in an aggregate. This is the preferred way to extract data from an aggregate, since it will work on any type of aggregate unlike sdaiGetAggrByIndex().
The valueType parameter specifies the type of the value parameter. Its value should be should be sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiBINARY, sdaiENUM, sdaiINSTANCE, sdaiAGGR or sdaiADB
If there is an error, this function returns sdaiNULL, otherwise, if the requested type is a primitive, the function return the parameter value, otherwise, it returns the handle of the instance or aggregates.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator does not exist sdaiAI_NEXS aggregate does not exist or is empty sdaiVT_NVLD type cannot be converted sdaiIR_NSET ADB is not set to a value
See Also
ISO 10303-22-10.12.7; ISO 10303-24-6.10.7
sdaiGetAllAttrs()
SdaiADB* sdaiGetAllAttrs( SdaiInstance instance, SdaiInteger *numberAttr );
The sdaiGetAllAttrs() function retrieves all the explicit attributes from an entity instance. This function is only supported for application instances. The attribute are returned as a array of ADB's. The size of this array is placed into the integer referred to by the numberAttr parameter.
This function returns an array of ADBs. The size of the array is returned in the parameter numberAttr. This array and its contents will remain valid until the next call to sdaiGetAllAttrs. Do not call sdaiDeleteADB() on the elements of this array, since they are automatically deleted.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not read-write
See Also
ISO 10303-24-6.8.13.2
sdaiGetAttr()
void* sdaiGetAttr( SdaiInstance instance, SdaiAttr attribute, SdaiPrimitiveType valueType, void *value );
The sdaiGetAttr function() returns the value of one of the explicit attributes of an entity instance. The valueType parameter identifies the type of the value parameter. This should be sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiBINARY, sdaiENUM, sdaiINSTANCE, sdaiAGGR, or sdaiADB.
If an error was generated, this function returns sdaiNULL, otherwise, if valueType is sdaiINSTANCE, sdaiAGGR, or sdaiADB, a handle for the requested object is returned. Otherwise, the return value is the same pointer as the value parameter.
Errors
sdaiSS_NOPN session is not open sdaiEI_NEXS entity instance is NULL sdaiSS_NOPN session not open sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute sdaiVA_NSET value is not set sdaiVT_NVLD invalid type sdaiFN_NAVL derived attribute is not supported sdaiAT_NVLD attribute is not in instance
Example
SdaiInstance inst; SdaiAttribute attr; SdaiInteger intval; : : sdaiGetAttr (inst, att, sdaiINTEGER, &intval);
See Also
sdaiGetAttrBN(); ISO 10303-22-10.10.1; ISO 10303-24-6.8.1
sdaiGetAttrBN()
void* sdaiGetAttrBN( SdaiInstance instance, SdaiString attributeName, SdaiPrimitiveType valueType, void *value );
This function returns the value of one of the explicit attributes of an entity instance. To avoid repeated name lookups, you should use sdaiGetAttr() instead of this function if you will be processing large numbers of objects.
The valueType parameter specifies the type of the value parameter. This should be sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiBINARY, sdaiENUM, sdaiINSTANCE, sdaiAGGR, or sdaiADB.
If an error was generated, this function returns sdaiNULL, otherwise, if valueType is sdaiINSTANCE, sdaiAGGR, or sdaiADB, a handle for the requested object is returned. Otherwise, the return value is the same pointer as the value parameter.
Errors
sdaiSS_NOPN session is not open sdaiEI_NEXT entity instance is NULL sdaiSS_NOPN session not open sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute sdaiVA_NSET value is not set sdaiVT_NVLD invalid type sdaiFN_NAVL derived attribute is not supported sdaiAT_NVLD attribute is not in instance
See Also
sdaiGetAttr(); ISO 10303-22-10.10.1; ISO 10303-24-6.8.1
sdaiGetAttrDefinition()
SdaiAttr sdaiGetAttrDefinition( SdaiEntity entity, SdaiString attrName );
The sdaiGetAttrDefinition() function returns one of the attribute definitions of an entity type. The attribute to be found is passed specified in the attrName parameter.
The function returns the attribute definition if found, otherwise sdaiNULL.
Errors
sdaiSS_NOPN session not open. sdaiED_NDEF entity not defined. sdaiAT_NDEF attribute not defined for the entity.
See Also
sdaiGetAttrDefinitionBN(); ISO 10303-24-6.7.5.1
sdaiGetAttrDefinitionBN()
SdaiAttr sdaiGetAttrDefinitionBN( SdaiString schemaName, SdaiString entityName, SdaiString attrName );
The getGetAttrDefinitionBN() function returns one of the attribute definitions of an entity type.
schemaName
- the name of the schema in which to find the entity.
entityName
- the name of the entity containing the attribute.
attrName
- the name of the attribute within the entity type.
This function returns attribute definition if found, otherwise sdaiNULL.
Errors
sdaiSS_NOPN session not open. sdaiSD_NDEF schema is not defined. sdaiED_NDEF entity not defined. sdaiAT_NDEF attribute not defined for the entity.
See Also
sdaiGetAttrDefinition(); ISO 10303-24-6.7.5.1
sdaiGetAttrs()
void sdaiGetAttrs( SdaiInstance instance, SdaiInteger numberAttr, SdaiAttr attribute, SdaiPrimitiveType valueType, void *value, ...);
The sdaiGetAttrs() function gets the values of one or more attributes from an entity instance.
instance
- the entity instance from which the attribute are to be retrieved.
numberAttr
- the number of attribute to be read.
attribute
- the first attribute to be read
valueType
- the type of the first attribute.
value
- pointer to an object of type specified in valueType where the first value is placed.
...
- the parameters attribute valueType and value are repeated for every attribute that is to be read. There must be as many attribute triples as numberAttr.
Errors
sdaiSS_NOPN session is not open sdaiEI_NEXS entity instance is NULL sdaiSS_NOPN session not open sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute sdaiVA_NSET value is not set sdaiVT_NVLD invalid type sdaiAT_NVLD attribute is in instance
Example
sdaiGetAttrs (inst, 3, att1, sdaiINTEGER, &intval, att2, sdaiSTRING, &strval, att3, sdaiINSTANCE, &instval);
See Also
sdaiGetAttrsBN(); ISO 10303-24-6.8.13.1
sdaiGetAttrsBN()
void sdaiGetAttrsBN( SdaiInstance instance, SdaiInteger numberAttr, SdaiString attributeName, SdaiPrimitiveType valueType, void *value, ...);
The sdaiGetAttrsBN() function gets the values of one or more attributes from an entity instance specified by parameter instance.
numberAttr
- the number of attributes to be read.
attributeName
- the name of the first attribute to be read
valueType
- the type of the first attribute.
value
- pointer to an object of type specified in valueType where the first value is placed.
...
- the parameters attributeName, valueType and value are repeated for every attribute that is to be read. There must be as many attribute triples as numberAttr.
Errors
sdaiSS_NOPN session is not open sdaiEI_NEXS entity instance is NULL sdaiSS_NOPN session not open sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute sdaiVA_NSET value is not set sdaiVT_NVLD invalid type sdaiAT_NVLD attribute is in instance
See Also
sdaiGetAttrs(); ISO 10303-24-6.8.13.1
sdaiGetComplexEntity()
SdaiEntity sdaiGetComplexEntity( SdaiNPL entityList );
The sdaiGetComplexEntity() searches a schema for a complex (AND_OR) entity definition and returns it. The complex type must be declared in the working set when the schema is compiled into the ROSE schema file.
The entityList parameter specifies a non-persistent list consisting of entity_definition instances that represent the supertypes of the complex entity.
This function returns an instance handle to an instance of type entity_definition, where entity_definition identifies the requested complex instance.
Errors
sdaiSS_NOPN session not open sdaiED_NDEF NPL is not valid or NULL or list is empty, entity not in schema sdaiED_NVLD an entity in the list is not valid
See Also
ISO 10303-22-10.9.1; ISO 10303-24-6.7.1
sdaiGetComplexEntityBN()
SdiaEntity sdaiGetComplexEntityBN( SdaiString schemaName, SdaiInteger nameNumber, SdaiString *nameVector );
The sdaiGetComplexEntityBN() function returns the entity_definition, if any, for the entity data type composed of the entity types whose names are supplied. The entity type to be returned must have been compiled into the ROSE schema using the working set option of expfront. This function will not construct a complex entity "on the fly".
schemaName
- the name of the schema in which to find entity definitions.
nameNumber
- the number of entity names supplied in the nameVector argument.
nameVector
- pointer to a vector of entity names.
This function returns the corresponding entity definition if it exists, otherwise sdaiNULL.
Errors
sdaiSS_NOPN session not open. sdaiSD_NDEF schema is not defined. sdaiED_NDEF list of names is NULL or empty, or entity is not in the schema. sdaiED_NVLD an entity name in the list is not valid.
See Also
ISO 10303-22-10.9.1; ISO 10303-24-6.7.1
sdaiGetDescription()
SdaiString sdaiGetDescription( SdaiAppInstance instance, SdaiString descriptionBuffer );
The sdaiGetDescription() function gets a human-readable description of an entity instance specified by parameter instance. In this implementation, this function returns the instance's type. The description is a NULL terminated string, and is placed into descriptionBuffer. This buffer should be at least 1024 characters.
This function returns the descriptionBuffer parameter.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance
See Also
ISO 10303-22-10.11.8; ISO 10303-24-6.9.9
sdaiGetEntity()
SdaiEntity sdaiGetEntity( SdaiModel model, SdaiString name );
The sdaiGetEntity() function finds an entity definition by name in a model's schema. This function looks in the model's schema for an entity_definition instance with the specified name.
This function returns an instance of entity_definition, if the instance could be found. Otherwise, it returns sdaiNULL and flags an error.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS NULL or invalid model sdaiMX_NDEF model not accessible sdaiED_NDEF cannot find entity or NULL name
Example
SdaiSession sess; SdaiRep repo; SdaiModel mod; SdaiEntity ent; : sess = sdaiOpenSession(); repo = sdaiOpenRepository (sess, "standard_3.0"); mod = sdaiAccessModelBN (repo, "modname", sdaiRO); : ent = sdaiGetEntity (mod, "cartesian_point");
See Also
ISO 10303-22-10.7.8; ISO 10303-24-6.5.6
sdaiGetEntityExtent()
SdaiSet sdaiGetEntityExtent( SdaiModel model, SdaiEntity entity );
The sdaiGetEntityExtent() function gets an entity extent for a model. An entity extent is the set of all instances of a specified entity (or its subtypes). The entity extents may also be obtained by examining model.contents.folders, however this function is more convenient.
This function returns an object of type SdaiSet containing all the objects of the requested type.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiED_NDEF entity definition NULL or not defined sdaiMX_NDEF model access not defined
See Also
ISO 10303-24-6.5.10.2; sdaiGetEntityExtentBN()
sdaiGetEntityExtentBN()
SdaiSet sdaiGetEntityExtentBN( SdaiModel model, SdaiString entityName );
The sdaiGetEntityExtentBN() function gets an entity extent for a model. An entity extent is the set of all instances of a specified entity (or its subtypes). The entity extents may also be obtained by examining model.contents.folders. The type is specified by name as the parameter entityName.
This function returns an object of type SdaiSet containing all the objects of the requested type.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiED_NDEF entity definition NULL or not defined sdaiMX_NDEF model access not defined
See Also
ISO 10303-24-6.5.10.2; sdaiGetEntityExtent();
sdaiGetInstanceModel()
SdaiModel sdaiGetInstanceModel( SdaiInstance instance );
The sdaiGetInstancemodel() function returns the model containing the instance specified by parameter instance.
This functions returns a handle for the instance's model. If there is an error, it returns sdaiNULL.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS entity instance does not exist sdaiMO_NEXS instance has no model
See Also
ISO 10303-22-6.8.3; ISO 10303-24-10.10.3
sdaiGetInstanceType()
SdaiEntity sdaiGetInstanceType( SdaiInstance instance );
The sdaiGetInstanceType() function returns the type (entity_definition) on an entity instance.
This function returns a handle to an instance of type SdaiEntity.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity
See Also
ISO 10303-22-10.10.4; ISO 10303-24-6.8.4
sdaiGetLowerIndex()
SdaiInteger sdaiGetLowerIndex( SdaiArray array );
The sdaiGetLowerIndex() function determines the lower index in an array. EXPRESS allows arrays to have user-defined upper and lower bounds, and this function returns the lower bound of an array. In this implementation, arrays always begin at zero, and so this function always returns 0.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is not an array
ISO 10303-22-10.17.3; ISO 10303-24-6.15.3
sdaiGetMemberCount()
SdaiInteger sdaiGetMemberCount( SdaiAggr aggregate );
The sdaiGetMemberCount() function returns a count of the number of elements in an aggregate.
Errors
sdaiSS_NOPN session not open. sdaiAI_NEXS the aggregate does not exist.
See Also
ISO 10303-22-10.12.1; ISO 10303-24-6.10.1
sdaiGetPersistentLabel()
SdaiString sdaiGetPersistentLabel( SdaiAppInstance instance, SdaiString labelBuffer );
The sdaiGetPersistentLabel() function returns a persistent identifier for an application instance. The persistent label is a string of at most 256 characters, and is placed into the memory pointed to by the labelBuffer parameter.
Errors
sdaiSS_NOPN session not open. sdaiAI_NEXS the aggregate does not exist.
See also
sdaiGetSessionId(); ISO 10303-22-10.11.6; ISO 10303-24-6.9.7
sdaiGetSessionId()
SdaiAppInstance sdaiGetSessionId( SdaiRep repository, SdaiString label );
The sdaiGetSessionId() function finds that instance which has a specific persistent label in the repository specified by the parameter repository.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS entity instance was not found
See also
sdaiGetPersistentLabel(); ISO 10303-22-10.11.7; ISO 10303-24-6.9.8
sdaiGetSchema()
SdaiSchema sdaiGetSchema( SdaiString schemaName );
The sdaiGetSchema() function finds and returns a schema definition by name. If the dictionary does not exist, this function generates it from the rose schema file, and possibly the EXPRESS parse data. It returns the appropriate schema_definition object from the dictionary model.
If successful, this function returns the handle of the appropriate schema_definition entity. Otherwise, it returns sdaiNULL.
Errors
sdaiSS_NOPN session not open sdaiSD_NDEF cannot find schema or NULL value sdaiRP_NOPN repository is not open
Example
SdaiSchema sch; sch = sdaiGetSchema (schemaName);
See Also
ISO 10303-24-6.4.10.1
sdaiGetSchemaInstance()
SdaiSchemaInstance sdaiGetSchemaInstance( DdaiString schemaInstanceName, SdaiRep repository );
The sdaiGetSchemaInstance() function finds a schema instance by name in a repository.
Errors
sdaiSS_NOPN session not open sdaiRP_NEXS NULL or invalid repo sdaiRP_NOPN repository is not open sdaiSI_NEXS could not find schema instance
Example
SdaiSchemaInstance si; si = sdaiGetSchemaInstance ("siname", rep);
See Also
ISO 10303-24-6.4.10.2
sdaiGetUpperIndex()
SdaiInteger sdaiGetUpperIndex( SdaiArray array );
The sdaiGetUpperIndex() function returns the maximum index value in an array. This function returns the highest index at which an element may be placed. (In this implementation, the upper index is one less than the size of the array.)
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is not an array
See Also
ISO 10303-22-10.17.4; ISO 10303-24-6.15.4
sdaiInsertAfter()
void sdaiInsertAfter( SdaiIterator iterator, SdaiPrimitiveType valueType, <TYPE> value);
The sdaiInsertAfter() function inserts a value into an ordered aggregate after the current position of an iterator.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW write permission denied sdaiIR_NSET iterator has no current member sdaiAI_NVLD aggregate is invalid sdaiVT_NVLD invalid type
See also
ISO 10303-22-10.19.2; ISO 10303-24-6.17.2
sdaiInsertBefore()
void sdaiInsertBefore( SdaiIterator iterator, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiInsertBefore() function inserts value into an ordered aggregate before the current value in an iterator.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW: write permission denied sdaiIR_NSET iterator has no current member sdaiAI_NVLD aggregate is invalid sdaiVT_NVLD invalid type
See Also
ISO 10303-22-10.19.1; ISO 10303-24-6.17.1
sdaiInsertByIndex()
void sdaiInsertByIndex( SdaiList list, SdaiAggrIndex index, SdaiPrimitiveType valueType, <TYPE> value);
The sdaiInsertByIndex() function inserts a value into a list at the specified index.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable sdaiIX_NVLD index not valid sdaiAI_NVLD aggregate not valid sdaiVT_NVLD type invalid
See Also
ISO 10303-22-10.19.3; ISO 10303-24-6.17.3
sdaiInsertNestedAggrAfter()
SdaiAggr sdaiInsertNestedAggrAfter( SdaiIterator iterator );
The sdaiInsertNestedAggrAfter() function creates a nested aggregate and inserts a value into an aggregate after the current value.
This function returns the newly created aggregate
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW: write permission denied
See Also
ISO 10303-22-10.19.5; ISO 10303-24-6.17.5
sdaiInsertNestedAggrAfterADB()
SdaiAggr sdaiInsertNestedAggrAfterADB( SdaiIterator iterator, SdaiADB selaggrInstance );
The sdaiInsertNestedAggrAfterADB() function creates and inserts an aggregate into an aggregate after the current value of an iterator. The selaggrInstance is an ADB identifying the type of the aggregate to be created in the event the elements of the aggregates are SELECTS. This ADB is also populated with the newly created aggregate.
This function returns the newly created aggregate
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW: write permission denied
See Also
ISO 10303-22-10.19.5; ISO 10303-24-6.17.5
sdaiInsertNestedAggrBefore()
SdaiAggr sdaiInsertNestedAggrBefore( SdaiIterator iterator );
The sdaiInsertNestedAggrBefore() function creates and inserts a new aggregate instance into the aggregate specified by the iterator before the current value of the iterator.
This function returns the newly created aggregate.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW: write permission denied
See Also
ISO 10303-22-10.19.4; ISO 10303-24-6.17.4
sdaiInsertNestedAggrBeforeADB()
SdaiAggr sdaiInsertNestedAggrBeforeADB( SdaiIterator iterator, SdaiADB selaggrInstance );
The sdaiInsertNestedAggrBeforeADB() function creates and inserts a new aggregate instance into an aggregate before the current value.
The selaggrInstance parameter is an ADB which identifies the type of the aggregate to be created in the event the elements of the aggregates are SELECTS. This ADB is also populated with the newly created aggregate.
This function returns the newly created aggregate.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW write permission denied
See Also
ISO 10303-22-10.19.4; ISO 10303-24-6.17.4
sdaiInsertNestedAggrByIndex()
SdaiAggr sdaiInsertNestedAggrByIndex( SdaiList list, SdaiAggrIndex index );
The sdaiInsertNestedAggrByIndex() function creates and inserts a new aggregate instance into an existing aggregate.
The function returns new newly created aggregate.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable
See Also
ISO 10303-22-10.19.6; ISO 10303-24-6.17.6
sdaiInsertNesterAggrByIndexADB()
SdaiAggr sdaiInsertNestedAggrByIndexADB( SdaiList list, SdaiAggrIndex index, SdaiADB selaggrInstance );
The sdaiInsertNestedAggrByIndexADB() function creates and inserts a new aggregate instance into an existing aggregate.
The selaggrInstance parameter specifies an ADB identifying the type of the aggregate to be created in the event the elements of the aggregates are SELECTS. This ADB is also populated with the newly created aggregate.
The function returns the newly created aggregate.
Errors
sdaiAB_NEXS NULL ADB sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable
See Also
ISO 10303-22-10.19.6; ISO 10303-24-6.17.6
sdaiIsInstanceOf()
SdaiBoolean sdaiIsInstanceOf( SdaiInstance instance, SdaiEntity entity );
The sdaiIsInstanceOf() function determines whether an instance is of a specified type. For this function to return true, the instance must be an instance of the specified entity definition (parameter entity), and not a subtype.
If instance is an instance of entity this function return sdaiTRUE, otherwise it returns sdaiFALSE. If an error occurs, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity
See Also
ISO 10303-22-10.10.5; ISO 10303-24-6.8.5
sdaiIsInstanceOfBN()
SdaiBoolean sdaiIsInstanceOfBN( SdaiInstance instance, SdaiString entityName );
The sdaiIsInstanceOfBN() function determines whether an instance is of a specified type. For this function to return true, the instance must be an instance of the type, and not a subtype.
If instance is an instance of the entity specified by parameter entityName this function returns sdaiTRUE, otherwise it returns sdaiFALSE. If an error occurs, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity sdaiED_NDEF entity definition NULL or not defined
See Also
ISO 10303-22-10.10.5; ISO 10303-24-6.8.5
sdaiIsEqual()
SdaiBoolean sdaiIsEqual( SdaiInstance inst1, SdaiInstance inst2 );
The sdaiIsEqual() function determines if two instance handles refer to the same underlying entity instance.
Example
SdaiInstance foo; SdaiInstance bar; if (sdaiIsEqual(foo, bar)) { printf ("Equal\n"); }
See Also
ISO 10303-24-6.1.4.1
sdaiIsKindOf()
SdaiBoolean sdaiIsKindOf( SdaiInstance instance, SdaiEntity entity );
The sdaiIsKindOf() function determines whether an instance is of a specified type or one of its subtypes.
instance
- the instance to be tested
entity
- the type to compare.
This function returns sdaiTRUE if instance is an instance of entity of is one of its subtypes. Otherwise, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity
See Also
ISO 10303-22-10.10.6; ISO 10303-24-6.8.6
sdaiIsKindOfBN()
SdaiBoolean sdaiIsKindOfBN( SdaiInstance instance, SdaiString entityName );
The sdaiIsKindOfBN() function determines whether an instance is of a specified type or one of its subtypes.
instance
- the instance to be tested
entityName
- name of the type to compare.
This function return sdaiTRUE if instance is an instance of entity of is one of its subtypes. Otherwise, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity sdaiED_NDEF entity definition NULL or not defined
See Also
ISO 10303-22-10.10.6; ISO 10303-24-6.8.6
sdaiIsMember()
SdaiBoolean sdaiIsMember( SdaiAggr aggregate, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiIsMember() function determines whether a given value is present as an element of a given aggregate.
This function returns sdaiTRUE if the given value is present in the aggregate, sdaiFALSE if not or if error.
Errors
sdaiSS_NOPN session not open. sdaiVT_NVLD the given value could not be converted appropriate type sdaiAI_NEXS the aggregate does not exist.
See Also
ISO 10303-22-10.12.2; ISO 10303-24-6.10.2
sdaiIsSDAIKindOf()
SdaiBoolean sdaiIsSDAIKindOf( SdaiInstance instance, SdaiEntity entity );
The sdaiIsSDAIsKindOf() function determines whether an instance is of a specified type or one of its subtypes. This function also considers the type hierarchy is in SDAI population schema.
This function return sdaiTRUE if instance is an instance of entity of is one of its subtypes. Otherwise, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity
See Also
ISO 10303-22-10.10.7; ISO 10303-24-6.8.7
sdaiIsSDAIKindOfBN()
SdaiBoolean sdaiIsSDAIKindOfBN( SdaiInstance instance, SdaiString entityName );
The sdaiIsSDAIKindOfBN() function determines whether an instance is of a specified type or one of its subtypes. This function also considers the type hierarchy is in SDAI population schema. (That is, the inheritance hierarchy is rooted at entity_instance, rather than an entity without any supertypes.)
This function return sdaiTRUE if instance is an instance of entity of is one of its subtypes. Otherwise, it returns sdaiFalse.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity sdaiED_NDEF entity definition NULL or not defined
See Also
ISO 10303-22-10.10.7; ISO 10303-24-6.8.7
sdaiIsSDAISubtypeOf()
SdaiBoolean sdaiIsSDAISubtypeOf( SdaiEntity subtype, SdaiEntity supertype );
This function determines whether an entity is a subtype of (or the same as) another entity. SDAI-specific entities are allowed. (That is, the inheritance hierarchy is rooted at entity_instance, rather than an entity without any supertypes.)
The function returns sdaiTRUE if the types are the same or if subtype is a subtype of supertype; sdaiFALSE otherwise.
Errors
sdaiSS_NOPN session not open. sdaiED_NDEF an entity is not defined.
See Also
ISO 10303-22-10.9.3; ISO 10303-24-6.7.3
sdaiIsSDAISubtypeOfBN()
SdaiBoolean sdaiIsSDAISubtypeOfBN( SdaiString schemaName, SdaiString subName, SdaiString superName );
The sdaiIsSDAISubtypeOfBN() function determines whether an entity is a subtype of (or the same as) another entity. SDAI-specific entity names are allowed.
This function returns sdaiTRUE if the types are the same or if subName names a subtype of superName; sdaiFALSE otherwise.
Errors
sdaiSS_NOPN session not open. sdaiSD_NDEF schema is not defined. sdaiED_NDEF an entity is not defined.
See Also
ISO 10303-22-10.9.3; ISO 10303-24-6.7.3
sdaiIsSubtypeOf()
SdaiBoolean sdaiIsSubtypeOf( SdaiEntity subtype, SdaiEntity supertype );
This function determines whether an entity is a subtype of (or the same as) another entity.
This function returns sdaiTRUE if the types are the same or if subtype is a subtype of supertype, sdaiFALSE otherwise.
Errors
sdaiSS_NOPN session not open. sdapED_NDEF an entity is not defined.
See Also
ISO 10303-22-10.9.2; ISO 10303-24-6.7.2
sdaiIsSubtypeOfBN()
SdaiBoolean sdaiIsSubtypeOfBN( SdaiString schemaName, SdaiString subName, SdaiString superName );
The sdaiIsSubtypeOfBN() function determines whether an entity is a subtype of (or the same as) another entity.
This function returns sdaiTRUE if the types are the same or if subName names a subtype of superName, otherwise it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open. sdaiSD_NDEF schema is not defined. sdaiED_NDEF an entity is not defined.
See Also
ISO 10303-22-10.9.2; ISO 10303-24-6.7.2
sdaiLogicalCompare()
int sdaiLogicalCompare( SdaiLogical value1, SdaiLogical value2 );
sdaiLogicalCompare() compares two logical values. Logical values are defined such that
sdaiFALSE < sdaiUNKNOWN < sdaiTRUE
The function returns 0, +1 or -1 according to the following:
value1 < value2 -1 value1 == value2 0 value1 > value2 +1
Unlike most other SDAI functions, sdaiLogicalCompare() can be called when there is no open session.
Errors
This function does not generate SDAI errors under any conditions.
Example
The following call:
val = sdaiLogicalCompare (sdaiFalse, sdaiUNKNOWN);
Returns the value -1
See Also
ISO 10303-24-6.1.2.1
sdaiNearCopyInstance()
SdaiAppInstance sdaiNearCopyInstance( SdaiAppInstance instance );
The sdaiNearCopyInstance() function creates a new instance within the same model and with the same attribute values as an instance.
This function returns a handle to the newly created instance.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance
See Also
ISO 10303-22-10.11.1; ISO 10303-24-6.9.1
sdaiNext()
SdaiBoolean sdaiNext( SdaiIterator iterator );
The sdaiNext() function advances an iterator to the next element. In a newly created iterator, or after sdaiBeginning() has been called, the first call to sdaiNext will advance the iterator to the first element.
This function returns a boolean value indicating whether or not the iterator was advanced to the next element. This allows sdaiNext() to be easily used in a while loop to iterate over all the aggregate's elements.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator does not exist sdaiAI_NEXS aggregate does not exist or is empty
Example
/*To iterate over every element in an aggregate: */ SdaiIterator itor; itor = sdaiCreateIterator (aggr); while (sdaiNext (itor)) { /* Get the value (replace TYPE with the aggregate type) */ sdaiGetAggrByIterator (itor, TYPE, &value); /* Now process the element */ } sdaiDeleteIterator(itor);
See Also
ISO 10303-22-10.12.6; ISO 10303-24-6.10.6
sdaiOpenRepository()
SdaiRep sdaiOpenRepository( SdaiSession session SdaiRep repository );
The sdaiOpenRepository() function opens a repository and makes it possible to create and access models in that repository. The repository handle may be obtained from the session object in the attribute known_servers. If you know the name of the repository to open, it may be more convenient to use sdaiOpenRepositoryBN.
The function returns the handle of the newly opened repository.
Errors
sdaiSS_NOPN session is not open sdaiRP_NEXS repository specified is sdaiNULL, or is not a repository
Example
/* This code finds and opens the first non-system repository found in the system */ SdaiSession sess = sdaiNULL; SdaiAggr reposet = sdaiNULL; SdaiIterator itor; SdaiString reponame; SdaiInstance repo; sess = sdaiOpenSession (); sdaiGetAttrBN (sess, "known_servers", sdaiAGGR, &reposet); itor = sdaiCreateIterator (reposet); sdaiNext (itor); do { sdaiGetAggrByIterator (itor, sdaiINSTANCE, &repo); sdaiGetAttrBN (repo, "name", sdaiSTRING, &reponame); } while (!strcmp(reponame, "SDAI_INTERNAL") && sdaiNext(itor)); repoval = sdaiOpenRepository (sess, sdaiNULL);
See Also
sdaiOpenRepositoryBN(); ISO 10303-22-10.4.5;ISO 10303-24-6.2.4
sdaiOpenRepositoryBN()
SdaiRep sdaiOpenRepositoryBN( SdaiSession session, SdaiString repositoryName );
The sdaiOpenRepositoryBN() function opens a repository by name. In this implementation the filesystem repository ($ROSE_DB) is named "standard_3.0". This function takes two parameters, this first, session, is the current SDAI session object, the second, repositoryName is the name of the repository to be opened.
Errors
sdaiSS_NOPN session is not open sdaiRP_NEXS repository specified does not exist
See Also
ISO 10303-22-10.4.5; ISO 10303-24-6.2.4
sdaiOpenSession()
SdaiSession sdaiOpenSession();
The sdaiOpenSession() function initializes the internal SDAI data structures for further SDAI calls. This function must be called before any other SDAI function.
If there was no error, sdaiOpenSession() returns a handle to an instance of sdai_session, otherwise it returns sdaiNULL.
Errors
sdaiSS_OPN session is already open
Example
SdaiSession sess; sess = sdaiOpenSession();
See Also
sdaiCloseSession() ; ISO 10303-22-10.3.1; ISO 10303-24-6.1.1
sdaiPrevious()
SdaiBoolean sdaiPrevious( SdaiIterator iterator );
The sdaiPrevious() function positions an iterator, iterator to the previous element. This function may only be used on iterators that are traversing ordered aggregates.
This function returns a boolean value indicating whether the aggregate was successfully positioned.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD iterator is not rewindable
See Also
sdaiNext(); ISO 10303-22-10.15.3; ISO 10303-24-6.13.3
sdaiPromoteModel()
void sdaiPromoteModel( SdaiModel model );
The sdaiPromoteModel() function converts a read-only model to a read-write model. The model must be open in read-only mode. After a successful call to this function, the model will be open in read-write mode, and model.mode is set to read_write.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXS sdaiNULL or invalid model sdaiMX_NDEF model not accessible sdaiMX_RW model access is read-write
Example
SdaiModel mod; sdaiAccessModel (mod, sdaiRO); sdaiPromoteModel (mod);
See Also
ISO 10303-22-10.7.4; ISO 10303-24-6.5.4
sdaiPutADBTypePath()
void sdaiPutADBTypePath( SdaiADB block, SdaiInteger typeNameNumber, SdaiString * typeNameVector );
The sdaiPutADBTypePath() sets the type path in an ADB. This is a list of strings that specify a path through a hierarchy of nested SELECT types.
block
- the ADB whose type path is set.
typeNameNumber
- number of strings in the type list
typeNameVector
- an array of strings (size given in previous parameter)
Errors
sdaiAB_NEXS NULL ADB sdaiSS_NOPN session not open
See Also
ISO 10303-24-6.18
sdaiPutADBValue()
void sdaiPutADBValue( SdaiADB block, SdaiPrimitiveType valueType, <TYPE> value );
This functions sets the type and value of an Attribute Data Block (ADB). The type is specified as valueType, and the value is in the parameter value.
Errors
sdaiSS_NOPN session not open sdaiVT_NVLD cannot convert type sdaiAB_NEXS adb is sdaiNULL
Example
SdaiADB adb; adb = sdaiCreateEmptyADB(); sdaiPutADBValue (adb, sdaiINTEGER, 12);
See Also
ISO 10303-24-6.2.12.3
sdaiPutAggrByIndex()
void sdaiPutAggrByIndex ( SdaiOrderedAggr aggregate, SdaiAggrIndex index, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiPutAggrByIndex() function sets the value of a specified element of an aggregate to a specified index.
The value parameter is an object of the type specified in valueType that indicates the value to be put in the aggregate.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is invalid sdaiMX_NRW model is not writable sdaiVT_NVLD type of value is not compatible with the type of the aggregate sdaiIX_NVLD index is invalid
See Also
ISO 10303-22-10.16.1; ISO 10303-24-6.14.1
sdaiPutAggrByIterator()
void sdaiPutAggrByIterator( SdaiIterator iterator, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiPutAggrByIterator() function sets the current value of an element of an aggregate referenced by the specified iterator.
The value parameter is an object of the type specified in valueType that indicates the value to be put in the aggregate.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiMX_NRW write permission denied, or iterator is not writable sdaiVT_NVLD invalid type sdaiIR_NSET iterator is unset sdaiAI_NEXS aggregate is NULL or missing sdaiAI_NVLD aggregate/iterator not writable
See Also
ISO 10303-22-10.13.2; ISO 10303-24-6.11.2
sdaiPutAllAttrs()
void sdaiPutAllAttrs( SdaiAppInstance appInstance, SdaiInteger numberAttr, SdaiADB *values );
The sdaiPutAllAttrs() function updates all the attributes in an application instance.
appInstance
- the instance whose attributes are being set
numberAttr
- number of attributes to be set. This is the size of the values array.
values
- array of ADBs containing the values to be set. The parameters are in the same order as they are in a part 21 file. (i.e. attribute in the order they are defined in EXPRESS, supertypes first, redefined attributes where they are first defined)
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable
See Also
ISO 10303-24-6.9.20.2; _sdaiGetAllAttrDefinitions ()
sdaiPutAttr()
void sdaiPutAttr( SdaiAppInstance instance, SdaiExplicitAttr attribute, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiPutAttr() function sets the value of the attribute specified by parameter attribute in the instance specified by parameter instance. The value parameter is an object of the type specified in valueType that indicates the value to be put in the attribute.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiVT_NVLD type of attribute cannot be converted to requested type sdaiAT_NVLD attribute is invalid
See Also
ISO 10303-22-10.11.3; ISO 10303-24-6.9.4
sdaiPutAttrBN()
void sdaiPutAttrBN( SdaiAppInstance instance, SdaiString attributeName, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiPutAttrBN() function sets the value of the attribute specified by name in parameter attributeName in the instance specified by parameter instance. The value parameter is an object of the type specified in valueType that indicates the value to be put in the attribute.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS entity instance does not exist sdaiMO_NEXS instance has no model sdaiED_NDEF entity definition NULL or not defined sdaiAT_NDEF NULL or bad attribute sdaiMX_NRW model not writable sdaiVT_NVLD type of attribute cannot be converted to requested type sdaiAT_NVLD attribute is invalid
See Also
ISO 10303-22-10.11.3; ISO 10303-24-6.9.4
sdaiPutAttrs()
void sdaiPutAttrs( SdaiAppInstance appInstance, SdaiInteger numberAttr, SdaiExplicitAttr attribute, SdaiPrimitiveType valueType, <TYPE> value, ... );
The sdaiPutAttrs() function sets the value of one or more attributes in an instance to the user specified value.
appInstance
- the instance to be updated
numberAttr
- the number of attributes to be updated
attribute
- the first attribute to be updated
valueType
- the type the first value
value
- an object of the type indicated in valueType. This is the first value to be put.
...
- Parameters attribute, valueType, and value repeated numberAttr times for every attribute up be updated.
Errors
sdaiEI_NEXS NULL instance sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiVT_NVLD type of attribute cannot be converted to requested type sdaiAT_NVLD attribute is invalid
See Also
ISO 10303-24-6.9.20.1
sdaiPutAttrsBN()
void sdaiPutAttrsBN(SdaiAppInstance appInstance, SdaiInteger numberAttr, SdaiString attributeName, SdaiPrimitiveType valueType, <TYPE> value, ...);
The sdaiPutAttrs() function sets the value of one or more attributes in an instance to user specified values.
appInstance
- the instance to be updated
numberAttr
- the number of attribute to be updated
attributeName
- the name of the first attribute to be set
valueType
- the type the first value
value
- an object of the type indicated in valueType. This is the first value to be put.
...
- Parameters attributeName, valueType, and value repeated numberAttr times for every attribute up be updated.
Errors
sdaiEI_NEXS NULL instance sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiVT_NVLD type of attribute cannot be converted to requested type sdaiAT_NVLD attribute is invalid
See Also
ISO 10303-24-6.9.20.1
sdaiRemove()
void sdaiRemove( SdaiUnorderedAggr unorderedAggr, SdaiPrimitiveType valueType, <TYPE> value );
The sdaiRemove() function removes a value from an unordered aggregate. If the aggregate contains more than one instance, a single instance is removed.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable sdaiAI_NVLD Invalid aggregate sdaiVA_NEXS element of specified value does not exist in aggregate
See Also
ISO 10303-22-10.14.3; ISO 10303-24-6.12.3
sdaiRemoveByIndex()
void sdaiRemoveByIndex( SdaiList list, SdaiAggrIndex index );
The sdaiRemoveByIndex() function removes a specified element from an aggregate at the index specified by parameter index.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable sdaiIX_NVLD index is invalid
See Also
ISO 10303-22-10.19.7; ISO 10303-24-6.17.7
sdaiRemoveByIterator()
void sdaiRemoveByIterator( SdaiIterator iterator );
The sdaiRemoveByIterator() removes the current element from an aggregate as referenced by an iterator.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiIR_NSET iterator is at beginning or end sdaiAI_NVLD aggregate/iterator not writable sdaiMX_NRW: write permission denied, or iterator is not writable (and
See Also
ISO 10303-22-10.13.3; ISO 10303-24-6.11.3
sdaiRemoveModel()
void sdaiRemoveModel( SdaiSchemaInstance schemaInstance, SdaiModel model );
The sdaiRemoveModel() function removes a model from a specified schema instance.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist sdaiMO_NEXS model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open sdaiMX_NDEF model not open
See also
ISO 10303-22-10.6.4; ISO 10303-24-6.4.4
sdaiRemoveModelBN()
void sdaiRemoveModelBN ( SdaiSchemaInstance schemaInstance, SdaiRep repository, SdaiString modelName );
The sdaiRemoveModelBN() function removes a model from a schema instance. The model is identified by name in a repository.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist sdaiMO_NEXT model does not exist, or NULL value passed in sdaiRP_NOPN model's repo is not open
Example
sdaiRemoveModel (si, rep, "modName");
See Also
ISO 10303-22-10.6.4; ISO 10303-24-6.4.4
sdaiRenameModel()
void sdaiRenameModel(
SdaiModel model,
SdaiString modelName
);
The sdaiRenameModel() function permanently renames a model in a repository.
See Also
ISO 10303-22-7.210.; ISO 10303-24-6.5.2
sdaiRenameSchemaInstance()
void sdaiRenameSchemaInstance( SdaiSchemaInstance schemaInstance, SdaiString schemaInstanceName );
The sdaiRenameSchemaInstance() function renames a schema instance to a new name.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist
See also
ISO 10303-22-10.6.2; ISO 10303-24-6.4.2
sdaiRenameSchemaInstanceBN()
void sdaiRenameSchemaInstanceBN ( SdaiString schemaInstanceOldName, SdaiRep repository, SdaiString schemaInstanceName );
The sdaiRenameSchemaInstanceBN() function renames a schema instance in a repository. The schema instance is identified by name.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist sdaiSI_DUP duplicate name
Example
sdaiRenameSchemaInstance ("oldname", repo, "newname");
See Also
ISO 10303-22-10.6.2; ISO 10303-24-6.4.2
sdaiResetArrayIndex()
void sdaiResetArrayIndex( SdaiArray array, SdaiAggrIndex lower, SdaiAggrIndex upper );
The sdaiResetArrayIndex() resizes an array by resetting the upper an lower bounds. In this implementation, the lower bound must be zero, and the upper bound must >= 0.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable sdaiSY_ERR bounds are invalid
See Also
ISO 10303-22-10.18.4; ISO 10303-24-6.16.4
sdaiRestoreErrorHandler()
SdaiErrorHandler sdaiRestoreErrorHandler();
The sdaiRestoreErrorHandler() function pops a handler off the stack that was pushed on by a call to sdaiSetErrorHandler(). The return value is the function pointer that was popped off the stack. If the stack was empty, NULL is returned.
Example
See sdaiSetErrorHandler()
See Also
sdaiSetErrorHandler(); ISO 10303-24-6.1.3.3
sdaiSaveChanges()
void sdaiSaveChanges( SdaiModel model );
The sdaiSaveChanges() function causes a model and all its associated instances to be saved. Any call to sdaiUndoChanges() after a call to sdaiSaveChanges() will restore the model to the state it was in at the time the model was last saved.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXT model does not exist, or NULL value passed in sdaiRP_NOPN model's repository is not open
See Also
sdaiUndoChanges(); ISO 10303-22-10.7.11; ISO 10303-24-6.5.9
sdaiSetErrorHandler()
void SdaiErrorHandler function( SdaiErrorProc handler );
The sdaiSetErrorHandler() function replaces the default error handler with one provided by the user. The previous handler is pushed onto an internal stack and may be restored by calling sdaiRestoreErrorHandler().
The error handler must conform to the following prototype:
void error_fn (SdaiErrorCode errcode);
You may push the default error handler onto that stack by passing NULL as the handler function.
Example
void handler (SdaiErrorCode) { printf ("Oops, we got an error!\n"); } sdaiSetErrorHandler (handler); : : sdaiRestoreErrorHandler (); /* restore original handler */
See Also
sdaiRestoreErrorHandler(); ISO 10303-24-6.1.3.2
sdaiTestArrayByIndex()
SdaiBoolean sdaiTestArrayByIndex( SdaiArray array, SdaiAggrIndex index );
The sdaiTestArrayByIndex() function tests if an element of an array is set.
This function returns sdaiTRUE if the index was set, otherwise, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is invalid
See Also
ISO 10303-22-10.17.1; ISO 10303-24-6.15.1
sdaiTestArrayByItr()
SdaiBoolean sdaiTestArrayByItr( SdaiIterator iterator );
The sdaiTestArrayByItr() function tests whether the current value of an iterator is set.
This function returns sdaiTRUE if the element in the iterator was set, otherwise, it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL
See Also
ISO 10303-22-10.17.2; ISO 10303-24-6.15.2
sdaiTestAttr()
SdaiBoolean sdaiTestAttr( SdaiInstance instance, SdaiAttr attribute );
The sdaiTestAttr() function tells whether an attribute of an instance has a value. In this implementation, this function always returns sdaiTRUE on an attribute of type SdaiInteger, SdaiReal, SdaiBoolean, or SdaiLogical, since these types do not have a valid unset value.
This function returns sdaiTRUE if the attribute has a value in the entity instance, otherwise sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS entity instance does not exist sdaiAT_NVLD att is not explicit attribute sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute
See Also
ISO 10303-22-10.10.2; ISO 10303-24-6.8.2; sdaiTestAttrBN()
sdaiTestAttrBN()
SdaiBoolean sdaiTestAttrBN( SdaiInstance instance, SdaiString attributeName );
The sdaiTestAttrBN() function tells whether an attribute in an entity instance has a value. This function always returns sdaiTRUE on an attribute of type SdaiInteger, SdaiReal, SdaiBoolean, or SdaiLogical, since these types do not have a valid unset value.
This function returns sdaiTRUE if the attribute has a value in the entity instance, otherwise it returns sdaiFALSE.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS entity instance does not exist sdaiAT_NVLD att is not explicit attribute sdaiAT_NDEF NULL attribute sdaiED_NVLD attribute object is not an attribute
See Also
ISO 10303-22-10.10.2; ISO 10303-24-6.8.2;sdaiTestAttr()
sdaiUndoChanges()
void sdaiUndoChanges( SdaiModel model );
The sdaiUndoChanges() function restores a model to the state it was in when it was last saved. Any changes made since that time are undone. In this implementation, the model's instances are reassigned, so any access to handles before the calling sdaiUndoChanges() are undefined.
Errors
sdaiSS_NOPN session not open sdaiMO_NEXT model does not exist, or NULL value passed in sdaiRP_NOPN model's repository is not open
See Also
sdaiSaveChanges(); ISO 10303-22-10.7.10; ISO 10303-24-6.5.8
sdaiUnsetADB()
void sdaiUnsetADB( SdaiADB block );
The sdaiUnsetADB() function clears the value stored in an ADB. The result will be the same as an ADB created by sdaiCreateEmptyADB(). Any attempt to get the value in the ADB after calling this function will result in an error.
Errors
sdaiSS_NOPN session not open sdaiAB_NEXS adb is sdaiNULL
Example
SdaiADB adb; sdaiUnsetADB (adb);
See Also
ISO 10303-24-6.2.12.5
sdaiUnsetArrayByIndex()
void sdaiUnsetArrayByIndex( SdaiArray array, SdaiAggrIndex index );
The sdaiUnsetArrayByIndex() function unsets an element of an aggregate. The element to be unset is specified by index as the parameter index.
Errors
sdaiSS_NOPN session is not open sdaiAI_NEXS aggregate does not exist sdaiAI_NVLD aggregate is internal and thus not writable sdaiMX_NRW model is not writable
See Also
ISO 10303-22-10.18.1; ISO 10303-24-6.16.1
sdaiUnsetArrayByItr()
void sdaiUnsetArrayByItr( SdaiIterator iterator );
The sdaiUnsetArrayByItr() function unsets the current value of an aggregate referenced by an iterator.
Errors
sdaiSS_NOPN session not open sdaiIR_NEXS iterator NULL sdaiAI_NVLD aggregate/iterator not writable sdaiAI_NEXS aggregate does not exist or is empty sdaiMX_NRW model is not writable
See Also
ISO 10303-22-10.18.2; ISO 10303-24-6.16.2
sdaiUnsetAttr()
void sdaiUnsetAttr( SdaiAppInstance instance, SdaiExplicitAttr attribute );
The sdaiUnsetAttr() function removes the value from an attribute. After an attribute in unset, all future attempts to access it will result in an error.
Errors
sdaiAT_NDEF NULL attribute sdaiAT_NVLD att is not explicit attribute or attribute cannot be unset sdaiED_NVLD entity object is not an entity sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiSS_NOPN session not open
See Also
ISO 10303-22-10.11.4; ISO 10303-24-6.9.5
sdaiUnsetAttrBN()
void sdaiUnsetAttrBN ( SdaiAppInstance instance, SdaiString attributeName );
The sdaiUnsetAttrBN() function removes the value of an attribute.
Errors
sdaiAT_NDEF NULL attribute sdaiAT_NVLD att is not explicit attribute or attribute cannot be unset sdaiED_NVLD entity object is not an entity sdaiEI_NEXS NULL entity/entity not an application instance sdaiMX_NRW model not writable sdaiSS_NOPN session not open
Example
sdaiUnsetAttrBN (inst, "attrname");
See Also
sdaiUnsetAttr(); ISO 10303-22-10.11.4; ISO 10303-24-6.9.5
sdaiValidateAggrSizes()
SdaiLogical sdaiValidateAggrSizes ( SdaiAppInstance instance, SdaiNPL list );
The sdaiValidateAggrSizes() function checks that all aggregate typed attributes are of legal sizes.
Any attributes that do not conform to the constraint are appended to the NPL provided as the list parameter.
This function return sdaiTRUE if the instance conforms to the rule; sdaiFALSE if it violates the constraint; and sdaiUNKNOWN is there is an error, or the system is unable to determine if it conforms.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.11.13; ISO 10303-24-6.9.14
sdaiValidateAggrUni()
SdaiBoolean sdaiValidateAggrUni ( SdaiAppInstance instance, SdaiNPL list );
The sdaiValidateAggrUni() function checks that all aggregates declared to have unique elements (e.g. sets) do not have any duplicates.
Any attributes that do not conform to the constraint are appended to the NPL provided as the list parameter.
This function return sdaiTRUE if the instance conforms to the rule; sdaiFALSE if it violates the constraint; and sdaiUNKNOWN is there is an error, or the system is unable to determine if it conforms.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.11.14; ISO 10303-24-6.9.15
sdaiValidateArrayNotOptional()
SdaiBoolean sdaiValidateArrayNotOptional ( SdaiAppInstance instance, SdaiNPL list );
The sdaiValidateArrayNotOptional() function checks that all array-typed attributes in the specified instance that require it, have values. (That is, that the arrays contains no empty slots.)
Any attributes that do not conform to the constraint are appended to the NPL provided as the list parameter.
This function return sdaiTRUE if the instance conforms to the rule; sdaiFALSE if it violates the constraint; and sdaiUNKNOWN is there is an error, or the system is unable to determine if it conforms.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.11.15; ISO 10303-24-6.9.16
sdaiValidateAttrTypes()
SdaiLogical sdaiValidateAttrTypes( SdaiAppInstance instance, SdaiNPL list );
The sdaiValidateAttrTypes() function determines if the attributes of an instance are of the correct types. In this implementation, the types of attribute are validated when the attribute is set (e.g by sdaiPutAttr()), and the put function generates the sdaiVT_NVLD error is the type is invalid. Because of this behavior in the put functions, that attribute always have the correct types, so this function always returns sdaiTRUE.
Errors
sdaiSS_NOPN session is not open
See also
ISO 10303-22-10.11.13; ISO 10303-24-6.9.14
sdaiValidateBinaryWidth()
SdaiLogical sdaiValidateBinaryWidth ( SdaiAppInstance appInstance, SdaiNPL list );
The sdaiValidateBinaryWidth() function checks that all binary typed attributes in an instance are of a length allowed by the information model.
Any attributes that do not conform to the constraint are appended to the NPL provided as the list parameter.
This function return sdaiTRUE if the instance conforms to the rule; sdaiFALSE if it violates the constraint; and sdaiUNKNOWN is there is an error, or the system is unable to determine if it conforms.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.11.17; ISO 103030-24-6.9.18
sdaiValidateInverseAttrs()
SdaiBoolean sdaiValidateInverseAttrs ( SdaiAppInstance instance, SdaiNPL list );
The sdaiValidateInverseAttrs() function validates that the constraints defined by inverse attribute are met.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.11.11; ISO 10303-24-6.9.12
sdaiValidateRealPrecision()
SdaiLogical sdaiValidateRealPrecision( SdaiAppInstance appInstance, SdaiNPL list );
The sdaiValidateRealPrecision() function determines if the real attributes in an instance have sufficient precision as defined by the EXPRESS. In this implementation, this function always return sdaiTRUE because ST-Developer always uses doubles to store real values.
Errors
sdaiSS_NOPN session is not open.
See also
ISO 10303-22-10.11.18; ISO 10303-24-6.9.19
sdaiValidateReferenceDomain()
SdaiLogical sdaiValidateReferenceDomain( SdaiSchemaInstance schemaInstance, SdaiAppInstance appInstance, SdaiNPL list );
The sdaiValidateReferenceDomain() function determines if all the attribute of an instance occur within a specified schema instance.
Errors
sdaiSS_NOPN session not open sdaiSI_NEXS schema instance does not exist sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See also
ISO 10303-22-10.6.7; ISO 10303-24-6.4.7
sdaiValidateRequiredAttrs()
SdaiBoolean sdaiValidateRequiredAttrs( SdaiAppInstance instance, SdaiNPL list );
The sdaiValidateRequiredAttrs() function determines if all the required attributes (e.g. those attribute not flagged as OPTIONAL in the EXPRESS code) are set. Any required attribute that was not set is added to the non-persistent list specified by the parameter list. In this implementation, the function will never flag an attribute of type integer, real, boolean or logical as unset, since there is no valid unset value.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See also
ISO 10303-22-10.11.10; ISO 10303-24-6.9.11
sdaiValidateSchemaInstance()
SdaiLogical sdaiValidateSchemaInstance ( SdaiSchemaInstance schemaInstance );
The sdaiValidateSchemaInstance() function validates a schema instance. The validation includes
The schemaInstance parameter, as an extension to part 24, may be a model in addition to a schema instance.
The function returns sdaiTRUE if the schema instance conforms to all the constraints. It returns sdaiFALSE, if one or more of the constraints are not met, and it returns sdaiUNKNOWN if there is an error, or if it is unable to determine is the constraints are met.
Errors
sdaiSS_NOPN session is not open sdaiSI_NEXS schema instance does not exist
Example
if (sdaiValidationSchemaInstance(si)) printf ("Schema instance OK\n");
See Also
ISO 10303-22-10.5.8; ISO 10303-24-6.4.8
sdaiValidateStringWidth()
SdaiLogical sdaiValidateStringWidth ( SdaiAppInstance appInstance, SdaiNPL list );
The sdaiValidateStringWidth() function checks that all string typed attributes in an instance are of a length allowed by the information model.
Any attributes that do not conform to the constraint are appended to the NPL provided as the list parameter.
This function return sdaiTRUE if the instance conforms to the rule; sdaiFALSE if it violates the constraint; and sdaiUNKNOWN is there is an error, or the system is unable to determine if it conforms.
Errors
sdaiSS_NOPN session not open sdaiEI_NEXS NULL entity/entity not an application instance sdaiAI_NEXS NPL is not valid or NULL
See Also
ISO 10303-22-10.11.16; ISO 10303-24-6.9.17
sdaiValidateTypePath()
SdaiLogical sdaiValidateTypePath( SdaiAppInstance appInstance, SdaiNPL list );
The sdaiValidateTypePath() function determines if the attributes of an instance have valid types. In this implementation, the function always returns sdaiTRUE, since the type checking is done when the attribute is set.
Errors
sdaiSS_NOPN session is not open
See also
ISO 10303-24-6.18.3
sdaiValidateUniqueness()
SdaiLogical sdaiValidateUniqueness( SdaiSchemaInstance schemaInstance, SdaiUniRule uniRule, SdaiNPL list );
the sdaiValidateUniqueness() function evaluates a uniqueness rule over a schema instance (or model).
The schemaInstance parameter, as an extension to part 24, may be a model in addition to a schema instance.
The list parameter must be a preexisting NPL. Any instance which contains duplicated values is appended to the list.
The function returns sdaiTRUE if the schema instance conforms to all the constraints. It returns sdaiFALSE, if one or more of the constraints are not met, and it returns sdaiUNKNOWN if there is an error, or if it is unable to determine is the constraints are met.
Errors
sdaiSS_NOPN session is not open sdaiSI_NEXS schema instance does not exist sdaiRU_NDEF rule NULL or bad object sdaiAI_NEXS NPL is not valid or NULL
Example
SdaiNPL list = sdaiCreateNPL(); sdaiValidateUniqueness (si, rule, list);
See Also
ISO 10303-22-10.6.6; ISO 10303-24-6.4.6
sdaiValidateUniquenessBN()
SdaiLogical sdaiValidateUniquenessBN ( SdaiSchemaInstance schemaInstance, SdaiString entityName, SdaiString uniRuleName, SdaiNPL list );
the sdaiValidateUniquenessBN() function evaluates the uniqueness rule over a schema instance (or model). The rule is identified by name within an entity.
The schemaInstance parameter, as an extension to part 24, may be a model in addition to a schema instance.
The list parameter must be a preexisting NPL. Any instance which contains duplicated values is appended to the list.
The function returns sdaiTRUE if the schema instance conforms to all the constraints. It returns sdaiFALSE, if one or more of the constraints are not met, and it returns sdaiUNKNOWN if there is an error, or if it is unable to determine is the constraints are met.
Errors
sdaiSS_NOPN session not open sdaiRU_NDEF invalid or NULL scheme def sdaiSI_NEXS schema instance does not exist sdaiAI_NEXS NPL is not valid or NULL
Example
SdaiNPL list = sdaiCreateNPL(); sdaiValidateUniquenessBN (si, "entity", "rule", list);
See Also
ISO 10303-22-10.6.6; ISO 10303-24-6.4.6