How can I open a cel library using mdlSystem_newDesignFile

Hi, There,

I am trying to do the following from my MDL application using pure MDL:

1. Open a file selection dialogue box to let users to select a cell library.

2. Open the cell library as a normal design file using mdlSystem_newDesignFile().

The cell library was opened successfully. However, the MicroStation entered the non-graphic mode: i.e. I cannot display any graphics. If I start a new session of MicroStation and open the same library with file open menu item, the library was displayed without any problem.

Could someone tell me why the library was not displayed after opening by  mdlSystem_newDesignFile()?

Any suggestions will be greatly apreciated.

Ken

Parents
  • Unknown said:
    Open the cell library as a normal design file using mdlSystem_newDesignFile()

    A cell library is a DGN file having a .cel extension.  MicroStation V8 makes no distinction between a DGN file having multiple models and a cell library.  A cell is a model; a model is a cell.

    Unknown said:
    MicroStation entered the non-graphic mode

    As usual, it's difficult to provide a diagnosis without seeing the patient.

    How do you start

    1. MicroStation?
    2. Your MDL application?

    What does your main() look like?

     
    Regards, Jon Summers
    LA Solutions

  • Hi, Jon,

    The patient was not 100% truthful to the doctor (0;.  I have fund that the application was calling mdlSystem_enterGraphicsExtended with a wrong argument value in a hidden place. After I correct the mistake, the cell lib was displayed property.

    Thanks again for the patient of the doctor. You are the person making MDL programming tolerable.

    Ken

  • When to call mdlSystem_enterGraphics

    Unknown said:
    I start a MicroStation the "normal" way, with a design file open and displayed. I load my MDL application with mdl load myapplication

    Unknown said:
    I have fund that the application was calling mdlSystem_enterGraphicsExtended

    If loading an MDL application when MicroStation is already open, you don't need to call mdlSystem_enterGraphics.

    mdlSystem_enterGraphics is intended for use when you design your application to be run from the command line as an MS_INITAPPS (e.g. ustation.exe -waMyApp).

    When started as an MS_INITAPPS your application has considerable control over the way MicroStation proceeds …

    • If you don't call mdlSystem_enterGraphics, then MicroStation shows no graphics and, from the user's point of view, proceeds without interaction
    • If you do call mdlSystem_enterGraphics, or one of its close relatives, you choose to show some graphics to the user after your app. has controlled how MicroStation starts

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • When to call mdlSystem_enterGraphics

    Unknown said:
    I start a MicroStation the "normal" way, with a design file open and displayed. I load my MDL application with mdl load myapplication

    Unknown said:
    I have fund that the application was calling mdlSystem_enterGraphicsExtended

    If loading an MDL application when MicroStation is already open, you don't need to call mdlSystem_enterGraphics.

    mdlSystem_enterGraphics is intended for use when you design your application to be run from the command line as an MS_INITAPPS (e.g. ustation.exe -waMyApp).

    When started as an MS_INITAPPS your application has considerable control over the way MicroStation proceeds …

    • If you don't call mdlSystem_enterGraphics, then MicroStation shows no graphics and, from the user's point of view, proceeds without interaction
    • If you do call mdlSystem_enterGraphics, or one of its close relatives, you choose to show some graphics to the user after your app. has controlled how MicroStation starts

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children
No Data