Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
MicroStation Wiki MicroStation V8 VBA Programming Resources [CS]
    • 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. 

    MicroStation V8 VBA Programming Resources [CS]


    This Client Server article is republished in its entirety from 2002 for reference purposes.

    By Bentley Technical Support Group
    22 July 2002

    A variety of resources are available to help MicroStation V8 application developers take advantage of Visual Basic for Application (VBA) objects.

    Getting help for MicroStation V8 Visual Basic for Applications (VBA) objects can be a little tricky if you are not familiar with VBA. There are several ways to obtain help using Bentley's VBA API.

    MicroStation's V8 VBA Help

    The MicroStation V8 Visual Basic for Applications Online Help tool is a comprehensive resource for working in VBA, and should be your first stop. You can launch this tool from Windows without being in MicroStation. Click on the Start button on the Windows desktop and then follow this sequence:

    Programs > MicroStation V8 > Documentation > MicroStation V8 VBA

    CHM help file can be found at Bentley\Program\MicroStation\MicroStationVBA.chm.

    Bentley online help is a great resource for finding descriptions and examples for MicroStation VBA objects, object members and subs/functions.

    Microsoft's Object Browser

    Another way to find a method for an object is to utilize the Object Browser (Figure 1).


    Figure 1: MicroStation V8 VBA Help dialog.
    The Microsoft VBA Object Browser offers the ability to search into libraries for related classes and members. For example, if you needed to know how to set the height of a text element, the steps would be:

    Select the MicroStation DGN library
    Type in part of the member name you are looking for; in this case "height"
    Click on the binoculars icon to activate the search.

    The results from the search will be displayed in the Search Results list box (Figure 2). In this example the goal is to set the text height of a text element, so the item of interest is the TextStyle class.


    Figure 2: The Object Browser dialog.

    Using the library search tool can be a fast way to find information and resources while in the VBA editor. It is a quicker method than starting up Online Help and trying to sort all the results you might get from it.

    Microsoft's VBA Help

    Microsoft's VBA help is also delivered with MicroStation V8 (Bentley\Program\Install\VBA6\release\pFiles\Common\MSShared\Vba\Vba6\1033). If you have questions about VBA in general or Microsoft issues, this is a great first resource.

    More Resources

    The following are links to some of the many readily available resources on the Web for learning Visual Basic and Visual Basic for Applications programming. These links are only provided for a convenience; copyright laws may limit your use of the material you find.

    Tutorials:

    Gary Radley's VBA Tutor

    1001 Tutorials

    FindTutorials.com: The eLearning Web site

    Karl Moore's VB-World

    References:

    Microsoft Developers Library

    Visual Basic Explorer

    Dr. Dobb's DevSearcher, a programmer's search engine:

    Examples:

    Microsoft Visual Studio.net code samples

    FreeVBCode.com

    Planet Source Code

    VB/VBA Books:

    Sams' Teach Yourself Visual Basic 6 in 24 Hours

    By Greg M. Perry and Sanjaya Hettihewa

    Published by Sams' Publishing

    ISBN 0-672-31533-5

    VB and VBA in a Nutshell

    By Paul Lomax

    Published by O'Reilly and Associates

    ISBN 1-56592-358-8

    Beginning Visual Basic 6 by Peter Wright

    Published by Wrox Press

    ISBN 1-86100-105-3

    Visual BASIC 6 Weekend Crash Course

    By Richard Mansfield

    Published by John Wiley & Sons

    ISBN 0-7645-4679-1

    MicroStation On The Web
    MicroStation On The Web is a MicroStation V8 feature that connects your use of MicroStation with a variety of Web-based resources. The site provides access to essential information including MicroStation news, tips, and training and some examples. Some VBA examples are currently located on this site.

    See Also

    Client Server Archive

    MicroStation Desktop TechNotes and FAQs

    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!

     

    • client server 2002
    • Archived Client Server
    • client server
    • Share
    • History
    • More
    • Cancel
    • Elisa McGraw Created by Elisa McGraw
    • When: Mon, Jul 13 2009 5:59 PM
    • Dan Koval Last revision by Bentley Colleague Dan Koval
    • When: Mon, Aug 26 2013 9:31 AM
    • Revisions: 13
    • Comments: 4
    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

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