Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
MicroStation
  • Product Communities
  • More
MicroStation
MicroStation Wiki Compiling MDL Applications
    • Sign in

    • +MicroStation Wiki
    • +Administration Wiki
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • -Programming Wiki
      • A class to help create and modify text element
      • A Complete Example
      • A MicroStation VBA Example With Bentley ProjectWise
      • AddIn Development Using VB.NET
      • C# .NET Template with IPrimitiveCommandEvents Class
      • Capturing Graphics in Dynamic Views
      • Compiling MDL Applications
      • Database Manipulation
      • Debugging Native Code MDL Applications
      • Developing Code in VBA
      • Developing MicroStation Applications For DWG Files
      • Drag and Drop in MicroStation
      • Error: "Cannot save changes to VBA project 'Support' because it is read-only"
      • Getting And Setting Elements Using Graphic Groups In VBA [CS]
      • Getting Started with Visual Basic
      • How To Write A Recursive Routine In MicroStation VBA [CS]
      • Introducing Segment3D Methods In MicroStation V8 2004 Edition
      • Known issues in MDL and MicroStationAPI
      • Launching VBA Applications As Initapps Or Dgnapps [CS]
      • Learning MicroStation Addins Step by Step
      • MDL - Getting Started With XAttributes In MicroStation V8 XM Edition
      • MDL - Native Code Application Development
      • MDL Or MicroStation BASIC Choosing The Right Tool [TN]
      • MFC Dialog And Native Window Support
      • Microsoft Office VBA Patch Utility
      • MicroStation BASIC FAQ
      • MicroStation BASIC Limits [FAQ]
      • MicroStation Developer Documentation and Example Code
      • MicroStation Programming Advice
      • MicroStation SDK
      • MicroStation V8 Programming Tools Readme
      • MicroStation V8 VBA Programming Resources [CS]
      • MicroStation V8 XM Edition View Code Updates
      • MicroStation VBA Resources Revisited [CS]
      • Migrating Dimension Code To MicroStation V8
      • Migrating MDL Applications To Native Code
      • Mouse Wheel Events And The Visual Basic 6.0 IDE
      • Porting MDL Applications To MicroStation V8
      • Reading Elements From A Microsoft Access Database With VBA [CS]
      • Running MDL Applications
      • Scanning For MicroStation V8 Elements In VBA [CS]
      • Unleash A Workspace Wizard Automating Workspace Creation With MicroStation V8 And VBA [CS]
      • Using VBA To Detect The Current Or Last Used Command
      • Using VBA To Programmatically Export A VBA Project [CS]
      • Using VBA To Programmatically Import A VBA Projects Components And References [CS]
      • VBA -- Creating A Complex Application
      • VBA Interface Error: failed creating the comp manager - 0x80040583
      • VBA interface error: unable to get IDE
      • vba recording
      • Working With Levels In MicroStation VBA [CS]
      • Writing An MDL Application To Output Custom Placemarks To Google Earth
      • [V8i C++] PointCloud IPointCloudChannelDisplayHandler
    • +Visualization Wiki

     
     Questions about this article, topic, or product? Click here. 

    Compiling MDL Applications

      

    Document Information

    Document Type: TechNote  

    Product(s):  MicroStation

    Version(s):  All

    Original Author: Bentley Technical Support Group

    Legacy Document Number:  8122

    Overview

    Compiling a MicroStation 95/MicroStation SE MDL application in Windows 95 or Windows NT. These are simplified directions, for more complete instructions see the MDL Programmer's Guide available on your delivered CD.

    Solution

    To compile the MDL application, "YOURAPP" (substitute your application name here), do the following:

    Note: The file directory shown is valid if MicroStation is installed using the default directories. If you have used a different directory to install MicroStation, adjust the paths accordingly.

    1. The following three(3) environment variables need to be set. These can be set in the AUTOEXEC.BAT, the System Setup Tool or in a batch or script file that runs in a command shell.

       

      Add the mdl\bin directory to the path
      for example: Set path=%path%;C:\win32app\ustation\mdl\bin
      (path to BMAKEWIN.EXE)
      Set the MS environment variable
      for example: Set MS=C:\win32app\ustation
      (path to MicroStation)
      Set the BMAKE_OPT environment variable
      for example: Set BMAKE_OPT=-IC:\win32app\ustation\mdl\include
      (path to MDL.MKI)
      Note: In the BMAKE_OPT line above, that is a minus sign and uppercase i ( -I ) with no spaces from BMAKE_OPT to the end of the line.

       

    2. In DOS, change the directory to the path of the source code (i.e. YOURAPP.mc, YOURAPP.h, YOURAPP.mke, etc.). In this case, type:

      cd\...\YOURAPP

    3. From the C:\...\YOURAPP directory, type:

      bmakewin -a YOURAPP.MKE

    4. The compiler may return several warning statements, "...does not have an ANSI function declaration". In MicroStation 95, the MDL compiler was redesigned to be more strict about warnings. This particular warning can be eliminated in one of the following ways:
      1. The proper way is to include the respective function definition files (.FDF). See the MDL Supplement Guide.

        The following method is not recommended on a regular basis but will work to temporarily compile applications on your own machine.

      2. Ignore this warning. Although we don't recommend this for those developing MDL applications, in this case, this warning is harmless.
    5. If the application compiled, the compiler will return a line "Building C:\win32app\ustation\mdlapps\YOURAPP.ma". This line should appear approximately 4 lines above the last line returned by the compiler.
    6. Lastly, In MicroStation key in MDL load YOURAPP (substitute your application name here). This should load the application.

    See Also

    Product TechNotes and FAQs

    MicroStation Desktop TechNotes and FAQs

    External Links

    Bentley Technical Support KnowledgeBase

    Bentley LEARN Server

    Comments or Corrections?

    Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!

     

       

    • MicroStation V8
    • TechNote
    • TN8122
    • Share
    • History
    • More
    • Cancel
    • Dan Koval Created by Bentley Colleague Dan Koval
    • When: Fri, Sep 6 2013 9:46 AM
    • Revisions: 1
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies