This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Want to learn VBA for Microstation, Online Coarse or book, or VB scripting.

I want to learn to make program using VBA for Microstation. I would prefer to learn VBA not MDL since I would use that language or Excel or any other windows programs. I found a college coarse for Introductory to VBA. Which is not geared to any one windows program like Microstation. I assume this is not the best coarse to teach me how to program for Microstation. Any advise what kind of coarse I should be looking for, maybe VB scripting?  I am not quite clear what is the difference between VBA vs VB scripting.  Maybe some kind of training book instead?

 I want to automate some routine task we do in Microstation. I have learned to program from a book before, with AutoLisp (autocad), which I greatly enjoyed. So I have some experience in programming. I am hoping to ideally spend 40hours learning VBA through a coarse or book, not sure if that is realistic. Any advise of what kind of coarse or book. If VBA scrip is the way for me, where can I find a coarse or which tutorial book would you recommend. Thanks.

Parents
  • Hello lbbss,
    There is a pretty good guide delivered with MicroStation located in the
    MicroStationVBA.chm file.

    Don't know of any VBA for MicroStation classes but there is a good book for
    learning:

    Learning MicroStation VBA by Jerry Winters published by Bentley Institute
    Press

    You can order it from Amazon or Bentley for about $90

    > I want to learn to make program using VBA for Microstation. I would
    > prefer to learn VBA not MDL since I would use that language or Excel
    > or any other windows programs. I found a college coarse for
    > Introductory to VBA. Which is not geared to any one windows program
    > like Microstation. I assume this is not the best coarse to teach me
    > how to program for Microstation. Any advise what kind of coarse I
    > should be looking for, maybe VB scripting? I am not quite clear what
    > is the difference between VBA vs VB scripting. Maybe some kind of
    > training book instead?
    >
    > I want to automate some routine task we do in Microstation. I have
    > learned to program from a book before, with AutoLisp (autocad), which
    > I greatly enjoyed. So I have some experience in programming. I am
    > hoping to ideally spend 40hours learning VBA through a coarse or book,
    > not sure if that is realistic. Any advise of what kind of coarse or
    > book. If VBA scrip is the way for me, where can I find a coarse or
    > which tutorial book would you recommend. Thanks.
    >
  • Actually, there are onDemand eLearning courses for MicroStation VBA -- those can be found starting on http://www.bentley.com/en-US/Training/Products/Resources/Books/

    More details on the "Learning MicroStation VBA" Bentley Institute book mentioned can be found on http://www.bentley.com/en-US/Training/Products/Resources/Books/Learning+MicroStation+VBA.htm

      

  • Bliksem,

    I have to agree with you. For a $90 book to have mistakes like this is unconscionable. It is difficult enough to learn a new programming language without having to fight with code that obviously has not been proofread. I looked online for a least an errata sheet but apparently none exists. Bentley is obviously aware that this book has errors. Come on Bentley, how about a simple errata sheet?

  • Jonathan Martin said:

    Come on Bentley, how about a simple errata sheet?

    If you have any specific for instances, we will certainly look into them. TIA

      

  • Let me start with two in Chapter 5 that would be helpful,

    First, as Bliksem mentioned, the code on page 53 (towards the bottom of the page) has:

    Sub Draw (X As Double, Y As Double, Z As Double)

    That code will cause the program to fail. The correct code should be:

    Sub Draw()

    If you'll notice, the screen shot on the same page has the correct code.

    Another thing that would be useful (particularly to new programmers) is if somewhere in the text it mentions that the coding in Chapter 5 should be done using the design file called "Nothing.dgn." I started entering code using one of my blank design files and couldn't get the code to work. After just a bit of snooping, it occurred to me that the call to "nothing" wasn't a VBA call or variable, it was just the name of the design file. Might be nice if Jerry had mentioned that somewhere.

    I'll post any other problems as I come to them. I'm going to let the typos side (at least three in Chapter 5 and 6) because, after all, it is a technical book and grammar has no place in technology.

  • Got another one for you that I ran into today.

    In Chapter 10 we start in with the user interface on Page 167. A new form is created, a bunch code is added. You get to page 173 and a three line code is added which starts up the form. The code is:

    Sub DoCellInsertion()

      frmCellInsertion.Show vbModeless

    End Sub

    Great. The problem is, no where did it say to rename the form to "frmCellInsertion". So, if you are new to VB and you see that call, you probably aren't going to realize that it is calling the form by its name. It should be mentioned on page 168 when you are building the form that the name of the form needs to be changed.

  • I should get paid for this.

    Page 174, the Point List Reader. Thing is, it doesn't seem to work. Not by keying the code from the book or running the code from the CD.

    In the subroutine btnRead, the debugger doesn't seem to like the line:

    Open txtPointFile.Text For Input As #FFile

    Soooo... I'll try to brute force this one to figure out why it doesn't work, but, you know, an errata sheet... just sayin

Reply
  • I should get paid for this.

    Page 174, the Point List Reader. Thing is, it doesn't seem to work. Not by keying the code from the book or running the code from the CD.

    In the subroutine btnRead, the debugger doesn't seem to like the line:

    Open txtPointFile.Text For Input As #FFile

    Soooo... I'll try to brute force this one to figure out why it doesn't work, but, you know, an errata sheet... just sayin

Children