Please follow the MicroStation Programming forum best practices.
Identify Your Platform
Please identify the version of MicroStation, or other product such as PowerDraft, that you are using: MicroStation CONNECT or MicroStation V8i. What is the 8-digit version number (e.g. 10.xx.yy.zz) of MicroStation?
If you're using MicroStation in a ProjectWise (PW) managed environment, let us know that too.
The APIs supplied with MicroStation CONNECT are different to those supplied with MicroStation V8i. Consequently, our answers are likely to be different.
Identify Your Operating System
Please identify the version of Windows you are using. Is this 32-bit or 64-bit Windows?
Identify Your Programming Language
Are you writing MDL, C++, C#, VB.NET or MicroStation VBA?
Is your Application In-Process or Out-of-Process?
If you're creating a .NET application, are you building an AddIn in-process app. (i.e. a DLL) or a stand-alone app. (i.e. an EXE)?
Build Tools
Are you using Visual Studio or Bentley Make (bmake) to build your project? What version of Visual Studio are you using?
Code Syntax Highlighting
When you post code, use the Forum advanced editor's syntax highlighting tool. That's the icon that resembles a pencil: