How to remove all spot height cells and annotation

Hi everybody, I am new to Microstation and VBA. Can someone help me how I can remove all the spot height cells and texts (annotation) in the dgn file.

For example.  Spot Height Text#  level Number 8013(Level Name: Spot Elevation) and 4 (Level Name: Grid-Construction-Annotation)

     Spot Height Cell# Level Number 8013

The above Spot Height Cells & Text should be removed in the dgn using VBA code

Parents Reply Children
  • If you find a sequence of keyins to meet your needs you can use execute keyins in MicroStation VBA directly bu calling e.g. CadInputQueue.SendKeyin "CONSTRUCT SURFACE CROSSSECTION".

    Ideally you will want to build your experience using the MicroStation VBA object model to replace those keyins, but for now you can keep it simple.

    Another item to consider if you have a number of keyins to be executed sequentially, would be to place those groups of keyins in a MicroStation "script file".  A MicroStation script file is simply a text file that you place on your local drive or a network share, then run by using the ampersand symbol ("@") followed immediately by the full path and file name of the file to be run.  That file can only contain valid MicroStation and MDL application keyins.  Once you test your script file in MicroStation, you can change your VBA keyin to then be: CadInputQueue.SendKeyin "@C:\MicroStationScripts\Script1.txt"