Beyond MicroStation VBA - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Beyond MicroStation VBA

Description:

Beyond MicroStation VBA Vince Thompson Geometric Technology VBA Project Manager MicroStation Menu Command: Utilities-Macro-Project Manager VBA Macros use mvba ... – PowerPoint PPT presentation

Number of Views:425
Avg rating:3.0/5.0
Slides: 18
Provided by: stlouistm
Category:

less

Transcript and Presenter's Notes

Title: Beyond MicroStation VBA


1
Beyond MicroStation VBA
Vince Thompson Geometric Technology
2
VBA Project Manager
  • MicroStation Menu Command
  • Utilities-gtMacro-gtProject Manager
  • VBA Macros use mvba file name extension.

3
MicroStation VBA Examples
  • Sample MVBA files found in folder
  • \Program Files\Bentley\Workspace\System\
  • vba\examples
  • Other example sources
  • Bentley Select
  • Bentley Developer Network (BDN)
  • Upcoming MicroStation VBA Book

4
Where To Find Help
  • MicroStation Readme File.
  • MicroStation VBA Help File.
  • Bentley Newsgroup discussion.bentley.com
  • Bentley.microstation.v8.vba
  • Bentley Select Support
  • Bentley Developer Network

5
VBA Limitations
  • VBA is not compiled
  • VBA Protection is Limited (Google VBA Crack)
  • VBA meets .NET
  • Two Solutions Examined
  • Move VBA to Visual Basic.
  • Native Mode MicroStation Programming

6
Programming Style
  • Programmers Buzz Words
  • Thick Client vs. Thin Client
  • Business Rules
  • N-Tier Programming Techniques
  • Object Oriented Programming
  • (VBA supports all of the above techniques)

7
Thick vs. Thin Clients
  • A programmers view of code organization.
  • Thick Clients
  • All computational code placed in with the Form.
  • Thin Clients
  • Separate user interaction code from computation
    and Business Rules.
  • GUI displayed as Form, Web Page, etc.

8
Business Rules
  • Collections of computational procedures placed in
    modules separate from the user interface code.
    For example
  • Routines that might lookup data from tables when
    placing elements in a model.
  • Routines that scan a design file looking for
    elements with a certain level, color, weight
    criteria.
  • These modules may run outside of a VBA Macro.

9
N-Tier Programming
  • Move logical grouping of code to separate
    modules.
  • Program modules could run on separate computers
    or all on the same.
  • VBA Forms run on local computer
  • Business Rules run on Department Server
  • Engineering Analysis Modules run on Engineerings
    Server
  • Database code run on Database Server

10
Object Oriented Programming
  • This opens up a world of possibilities
  • Develop code around real world features.
  • Each feature is defined as a class with methods,
    properties, and events.
  • Design classes as if theyre experts whom you
    would ask questions from. (How many, how tall,
    what elevation, calculate volume, etc.)

11
VBA Conforms
  • VBA Supports these programming techniques in
    stand-alone MVBA applications.
  • However
  • New options emerge allowing Business Rules and
    Object Oriented code to become part of a compiled
    program using Visual Basic or other languages.

12
External Programs
  • Stand-alone program (exe).
  • ActiveX component (dll).
  • Compiled programs hide your intellectual property
    from theft or unauthorized modifications.

13
COM Programming
  • ActiveX components (EXE and DLL) are COM Objects.
  • Visual Basic, C/C and other languages are
    capable of building COM Objects.

14
VBA vs. VB.NET
  • More Source Code Changes In Your Future?
  • Significant Changes to the Visual Basic language.
  • Rewrite VBA code to comply with .NET
    requirements.
  • Increased Object Oriented capabilities.
  • Using .NET Common Language Runtime (CLR)

15
MicroStation Native Mode Programming
  • Visual C/C programming using Visual Studio
  • Use Visual C Debugger
  • Runs in same codespace as MicroStation
  • Can call MDL functions directly unlike VBA
    wrapper functions.
  • Compiled programs.

16
Native Mode Program Structure
  • Executables
  • Requires .MA file to load resources and identify
    .DLL program.
  • DLL program identified in .MA application.
  • Other Advantages
  • Build custom key-in commands.
  • Access to internal MDL resources.

17
Geometric Technology
  • VThompson_at_SomeoneKnows.com
  • Custom MicroStation VBA, MDL, and Native Mode
    Development.
  • Database Development
  • Bentley GeoGraphics Spatial Development.
Write a Comment
User Comments (0)
About PowerShow.com