Functions
Level Libraries

Functions

StatusInt mdlLevelLibrary_attach (LevelLibraryRefP *libraryRefOut, WCharCP fileNameIn, LevelLibraryFormat libraryFormatIn, DgnModelRefP modelRefIn)
 Attach specified level-library to the file's level-table of specified model-ref. More...
 
StatusInt mdlLevelLibrary_detach (LevelLibraryRefP libraryRefIn, DgnModelRefP modelRefIn)
 Detach specified level-library from the file's level-table of specified model-ref. More...
 
StatusInt mdlLevelLibrary_resync (DgnModelRefP modelRefIn)
 Resync attributes of an external level of the file of specified model-ref to match with its corresponding attributes in the level library. More...
 
LevelLibraryRefP mdlLevelLibrary_find (WCharCP fileNameIn, bool fuzzyMatchIn, DgnModelRefP modelRefIn)
 Find a library reference with specified file-name in file of specified model-ref. More...
 
StatusInt mdlLevelLibrary_import (WCharCP fileNameIn, LevelLibraryFormat libraryFormatIn, LevelLibraryImportMethod importByMethodIn, DgnModelRefP modelRefIn)
 Import levels from specified file into the file of specified model-ref. More...
 
StatusInt mdlLevelLibrary_importWithFilters (WCharCP fileNameIn, LevelLibraryFormat libraryFormatIn, LevelLibraryImportMethod importByMethodIn, DgnModelRefP modelRefIn)
 Import specified level-library and associated level filters into the file of specified model-ref. More...
 
StatusInt mdlLevelLibrary_export (WCharCP fileNameIn, LevelLibraryFormat libraryFormatIn, DgnModelRefP modelRefIn)
 Export levels of file of specified model-ref. More...
 
StatusInt mdlLevelLibrary_exportWithFilters (WCharCP fileNameIn, LevelLibraryFormat libraryFormatIn, DgnModelRefP modelRefIn)
 Export levels & filters of file of specified model-ref. More...
 
StatusInt mdlLevelLibrary_getName (WStringR libraryNameOut, LevelLibraryRefP libraryRefIn)
 Get name of a level-library. More...
 
StatusInt mdlLevelLibrary_getFormat (LevelLibraryFormat *libraryFormatOut, LevelLibraryRefP libraryRefIn)
 Get format of a level-library. More...
 
bool mdlLevelLibrary_isManuallyAttached (LevelLibraryRefP libraryRefIn)
 Check if a level-library is auto-attached or manually attached. More...
 
StatusInt mdlLevelLibrary_getCount (int *countOut, LevelLibraryCountType countTypeIn, DgnModelRefP modelRefIn)
 Get the number of attached level libraries to file of specified model-ref. More...
 

Detailed Description

Function Documentation

StatusInt mdlLevelLibrary_attach ( LevelLibraryRefP *  libraryRefOut,
WCharCP  fileNameIn,
LevelLibraryFormat  libraryFormatIn,
DgnModelRefP  modelRefIn 
)

Attach specified level-library to the file's level-table of specified model-ref.

Parameters
[out]libraryRefOutreference to attached library
[in]fileNameInname of library to attach
[in]libraryFormatInformat of file - one of LEVEL_LIBRARY_FORMAT_... (defined in leveltable.h)
[in]modelRefInmodel-ref of file to whose level-table the library should be attached
Returns
ERROR specified file-name is invalid or is not a level-library file or is already attached, else SUCCESS
StatusInt mdlLevelLibrary_detach ( LevelLibraryRefP  libraryRefIn,
DgnModelRefP  modelRefIn 
)

Detach specified level-library from the file's level-table of specified model-ref.

Parameters
[in]libraryRefInlibrary reference to detach
[in]modelRefInmodel-ref of file from whose level-table the library should be detached
Returns
ERROR if library reference cannot be detached, else SUCCESS
StatusInt mdlLevelLibrary_export ( WCharCP  fileNameIn,
LevelLibraryFormat  libraryFormatIn,
DgnModelRefP  modelRefIn 
)

Export levels of file of specified model-ref.

Parameters
[in]fileNameInname of library to export into
[in]libraryFormatInformat of file - one of LEVEL_LIBRARY_FORMAT_... (defined in leveltable.h)
[in]modelRefInmodel-ref of file
Returns
ERROR specified file-name is invalid, else SUCCESS
StatusInt mdlLevelLibrary_exportWithFilters ( WCharCP  fileNameIn,
LevelLibraryFormat  libraryFormatIn,
DgnModelRefP  modelRefIn 
)

Export levels & filters of file of specified model-ref.

Parameters
[in]fileNameInname of library to export into
[in]libraryFormatInformat of file - one of LEVEL_LIBRARY_FORMAT_... (defined in leveltable.h)
[in]modelRefInmodel-ref of file
Returns
ERROR specified file-name is invalid, else SUCCESS
LevelLibraryRefP mdlLevelLibrary_find ( WCharCP  fileNameIn,
bool  fuzzyMatchIn,
DgnModelRefP  modelRefIn 
)

Find a library reference with specified file-name in file of specified model-ref.

Parameters
[in]fileNameInname of library to detach
[in]fuzzyMatchInif true, the pFileNameIn is compared only against the base name of the library files
[in]modelRefInmodel-ref of file
Returns
library reference that matches the file name, else NULL if a library reference cannot be found
StatusInt mdlLevelLibrary_getCount ( int *  countOut,
LevelLibraryCountType  countTypeIn,
DgnModelRefP  modelRefIn 
)

Get the number of attached level libraries to file of specified model-ref.

Parameters
[out]countOutnumber of attached libraries
[in]countTypeInone of LEVEL_LIBRARY_COUNT_TYPE_... (defined in leveltable.h)
[in]modelRefInmodel-ref of file
Returns
ERROR if the countTypeIn is not a valid type, else SUCCESS
StatusInt mdlLevelLibrary_getFormat ( LevelLibraryFormat libraryFormatOut,
LevelLibraryRefP  libraryRefIn 
)

Get format of a level-library.

Parameters
[out]libraryFormatOutlevel library foramt
[in]libraryRefInlevel library reference
Returns
ERROR if pLibraryRefIn is not valid, else SUCCESS
StatusInt mdlLevelLibrary_getName ( WStringR  libraryNameOut,
LevelLibraryRefP  libraryRefIn 
)

Get name of a level-library.

Parameters
[out]libraryNameOutlevel library name
[in]libraryRefInlevel library reference
Returns
ERROR if pLibraryRefIn is not valid, else SUCCESS
StatusInt mdlLevelLibrary_import ( WCharCP  fileNameIn,
LevelLibraryFormat  libraryFormatIn,
LevelLibraryImportMethod  importByMethodIn,
DgnModelRefP  modelRefIn 
)

Import levels from specified file into the file of specified model-ref.

This function copies all the levels of the level-library into the file's level-table.

Parameters
[in]fileNameInname of library to import
[in]libraryFormatInformat of file - one of LEVEL_LIBRARY_FORMAT_... (defined in leveltable.h)
[in]importByMethodInone of LEVEL_LIBRARY_IMPORT_BY_... (defined in leveltable.h)
[in]modelRefInmodel-ref of file
Returns
ERROR specified file-name is invalid or is not a level-library file, else SUCCESS
StatusInt mdlLevelLibrary_importWithFilters ( WCharCP  fileNameIn,
LevelLibraryFormat  libraryFormatIn,
LevelLibraryImportMethod  importByMethodIn,
DgnModelRefP  modelRefIn 
)

Import specified level-library and associated level filters into the file of specified model-ref.

This function copies all the levels and filters of the level-library into the file's level & filter table.

Parameters
[in]fileNameInname of library to import
[in]libraryFormatInformat of file - one of LEVEL_LIBRARY_FORMAT_... (defined in leveltable.h)
[in]importByMethodInone of LEVEL_LIBRARY_IMPORT_BY_... (defined in leveltable.h)
[in]modelRefInmodel-ref of file
Returns
ERROR specified file-name is invalid, else SUCCESS
bool mdlLevelLibrary_isManuallyAttached ( LevelLibraryRefP  libraryRefIn)

Check if a level-library is auto-attached or manually attached.

Parameters
[in]libraryRefInlevel library reference
Returns
true if the level-library is manually attached, else false
StatusInt mdlLevelLibrary_resync ( DgnModelRefP  modelRefIn)

Resync attributes of an external level of the file of specified model-ref to match with its corresponding attributes in the level library.

Parameters
[in]modelRefInmodel-ref of file
Returns
SUCCESS

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.