I'm programming c on mdl microstation v8.5. I don't understand issue about scanning element with filtering level: scanList.levmask [0], scanList.levmask [1], scanList.levmask [2], scanList.levmask [3]. I want to filter level 10,23,32,can you explain it for me. Thanks
Hi Mai Q Huy,
8.5 is so long time ago, so I do not even have the help- files on my computer, but I found a snippet:
BitMask const* p_bitMask = mdlLevelTable_getDisplayMask(aktModelRef); mdlScanCriteria_setLevelTest(p_scan, (BitMask*)p_bitMask, FALSE, FALSE);
I guess the "mdlLevelTable_...." functions will give you more information.
At least it is a translation from the Level identified by its name Transforming it to its internal LevelID and from there to some "magic" BitMask.
Mit freundlichen Grüßen / Best regards Volker Hüfner
| AB_DATE Engineering Software | ab-date.de |
Answer Verified By: Mai Q Huy
Mai Q Huy said:I don't understand issue about scanning element with filtering level: scanList.levmask
The simple answer is: Don't use a level mask!
MicroStation MDL has a long history.
When MDL was introduced, MicroStation used the IGDS (V7) file format. In that file format, there was a fixed number of 63 levels.
The scanList.levmask was a bit-mask of 64 bits, one bit for each level (with one bit unused). It's not valid to use that with a V8 DGN file.
scanList.levmask
A V8 DGN file may have up to 2 billion levels (not that anyone defines that many). It's impractical to define a fixed-size bit-mask for that number of possibilities. Instead, V8 MDL has the dynamic (variable-size) BitMask to store a set of flags that indicate which levels to scan.
BitMask
Prefer to use the mdlScanCriteria_api. Use mdlScanCriteria_addSingleLevelTest to specify a single level. If you want to scan multiple levels, then you must set up a BitMask for those levels and pass it to the scanner using mdlScanCriteria_setLevelTest.
mdlScanCriteria_api
mdlScanCriteria_addSingleLevelTest
mdlScanCriteria_setLevelTest
Regards, Jon Summers LA Solutions
Thank you for supporting. I will check it out.