Questions similar to this appear on the Bentley Discussion Groups. These questions, or something like them, appeared in the MDL discussion group.

Q Questions about scanning pop up occasionally …

A This example Scan Element by ID accepts an Element ID on its command line …

mdl load ScanElementID <ElementID>

or

mdl load ScanElementID <ElementID> <view no.>

The program searches the active model for an element having the specified unique Element ID. If it finds the element, it uses its range to fit the specified view to the element. If a view is not specified, it defaults to view 1.

I wrote this appliation to help with understanding the structure of large files containing hundreds or thousands of elements. The size of the DGN file made it difficult to locate a particular element manually.

The accompanying MDL code illustrates several useful techniques …

Example Scan Element ID Project

The code fragments here illustrate particular points about scanning code. They provide a working example of using ScanCriteria in the application (.mc) and implementation (.dll) files in the ZIP archive. The complete example MDL project Scan Element ID supplies sample code and a complete working application.

Return to MDL articles index.