Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4331

[CONNECT C++] How to get a LevelId from a .dgnlib

$
0
0

In V8i we used to do this to get a LevelID:

LevelID		newLevelID;
if ( ERROR == mdlLevel_getIdFromCode(&newLevelID, ACTIVEMODEL, 99999))
	mdlLevel_getIdFromCode(&newLevelID, LEVEL_LIBRARY_MODELREF, 99999);

but in CONNECT, we can use the LevelCache:

LevelCache	&levelCache = eeh.GetDgnFileP()->GetLevelCacheR();	// ONLY levels IN the current file
for (LevelHandle level (levelCache.begin()); level != levelCache.end(); ++level)
{
	if (level.GetLevelCode() == 99999 )
	{
        }
}

but this seems to only search for levels in the specified DgnFile. How do we emulate the action of the V8i "LEVEL_LIBRARY_MODELREF"

 

 

Bruce


Viewing all articles
Browse latest Browse all 4331


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>