API Reference > Functions > SDAI > _sdaiCreateRepositoryFromFile Function
_sdaiCreateRepositoryFromFile Function
Syntax
C++
DAI_EXPORT SdaiRep _sdaiCreateRepositoryFromFile(SdaiSession session, SdaiString fileName, SdaiString name);

sdai.h

Parameters 
Description 
SdaiSession session 
[in] A session instance.  
SdaiString fileName 
[in] A string that contains the file name.  
SdaiString name 
[in] A string that contains the repository name. 

The created repository instance represented with its handler if the repository was successfully created; otherwise, the function returns the NULL pointer.  

instance of the created repository, in other case NULL

Creates a new repository from a specified file within the current SDAI session.

If the name of the repository is empty then the name of the file is used as the repository name. If the file contains several data sections (file_description.implementation_level equals to "3" or higher), every model gets the name predefined in file; otherwise (file_description.implementation_level equals to 2 ("2;1", "2;2") only the single model with the name "default" is created.

Copyright (c) 2002-2021. Open Design Alliance. All rights reserved.