Microstation Vba to MDL C++

https://translate.google.it/?sl=bg

Good morning
I make a premise, I'm not a programmer, I've never studied computer science, I don't know English. Despite this with the help of:
- store.bentley.com/.../WAD00781A10001--Learning-MicroStation-VBA
- http://www.la-solutions.co.uk

with suggestions from Jon Summers and Jan Slegr and Yongan.Fu
I managed to develop some VBA macros that help me in my work.
My dream would be to be able to develop or bring my vba macros into C # or C ++ or MDL,
but maybe they are a dream since I miss a lot of things.
My question is this:
how can one learn little by little how to program with these languages
​​considering that I cannot access the BDN.
Users who are less experienced like me will never be able to learn.

Grazie


  • My dream would be to be able to develop or bring my vba macros into C# or C++

    First, learn VB.NET or C#.  There are plenty of books and websites that deal with the .NET languages.  After you have learned the new language, consider using the MicroStation APIs.

    I'm not a programmer

    C++ is complex and philosophically quite different to VBA.  You would find it hard.

     
    Regards, Jon Summers
    LA Solutions

  • ok thanks a lot for the suggestion better VB.Net or C # ?

    Massimo Callegher
  • VB.Net or C #

    Would you like to start a war Massimo? ;-) such a question could blow up any developer community.

    I try to give you my opinion. Both languages are useful to deal with .Net. In the ranking C# is more popular asa VB.Net, so you might find more help in the WorlWideWeb if you ask C# questions.

    VB.Net is easier to write, C# is more strikt and formal. In the long view these restrictions helps to  keep the quality of the code. But if you think mostly about small encapsulated projects. VB.Net ist fine, too.

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • HI Massimo,

    my recommendation is "learn C#".

    As Volker wrote, "C# or VB.NET" discussions are never ending (and stupid wars sometimes), but in my opinion C# have provides several important advantages:

    • C# is the most important NET language (in fact NET is equal to C#). In other words, when a new feature is added to NET runtime, it's added at first to C# and maybe to other NET languages later.
    • There are many more C# developers than VB.NET, so when you will search Internet for answers, they will be likely in C#.
    • As Volker wrote, C# is "more strict and expressive", which looks more complicated for the first sight, but in long term perspective it leads to better code.
    • There are probably much more books and tutorials (probably also in Italian) about C# than about VB.NET.

    For some people an advantage of VB.NET is that it uses similar syntax. But my experience is that it means that people convert their bad habbits from VB/VBA to VB.NET.

    How to start? Buy some book or search Internet. I found e.g. this video, but I assume they are many available. Just use Visual Studio 2017 Community Edition (or brand new 2019) instead of any older.

    To be able to code in C# has nothing to do with BDN access, C# can be used anywhere. And we can hope that Bentley will become smarter (as smart as their competitors) and will open selected APIs to normal users in future. In fact, everything you need to develop MicroStation addins (C# apps for MicroStation) is installed with MicroStation itself (it's big difference comparing to C++ development), the only (unfortunately important) thing available in SDK only is API documentation (and examples).

    And last note: There are only two groups of people: Who complain it's complicated and who learned it ;-)

    It's true that to learn C# in detail requires to study thousands of pages, because you have to know a lot about internals and how NET runtime works, but it's the same in all industries and areas: The best drivers know a lot about engine, suspension, technical details about car chassis design and issues with different types of tires, and because of that they are the best ones. But 99.9% do not know it and they are still "good enoug drivers".

    And in fact, there are no limits: My father, when he was about 80, asked me to help him with Visual Studio installation, because he decided to update his knowledge "how C/C++ code looks today" :-))))

    With regards,

      Jan

  • Good morning
    thanks to everyone for the advice,

    I would like to do it before retiring :) but I see a road all uphill,

    I want to try it,

    it would take much longer than what I have available but I try
    Thanks again

    Massimo Callegher
  • it would take much longe

    I disagree a bit ;-)

    Especially when there is an existing knowledge of "some programming", at least about basic concepts like conditions, variables, cycles etc., first intro to C# can be pretty fast. Of course when you decide to know C# (or any other language) in detail, it's enormous huge task, but it's something for software architects, not for hobby developers.

    Regards,

      Jan


  • Hi Jan
    thank you for the trust you have in me :)
    now I feel already more prepared to face the problem :)
    In fact what I want to do is bring my VBA macros to C #.
    They are all small utilities for drawing and some of them interface with Excel to read or write data in the drawing.
    I must first start studying and then try a small project.
    Sincerely

    Massimo Callegher
  • hi jan
    I'm following an online C # course, fortunately in Italian
    www.youtube.com/watch
    I noticed the great power of the c # language and of VStudio easier to do things that in vba are difficult, but more difficult to learn. Maybe I had to dedicate myself a few years ago. For me it is a sea of ​​computing (I hope not to drown :). I also decided to buy this book www.amazon.it/.../ref=ox_sc_saved_image_1
    which covers C # 8 and VS 2019 I wonder if it's good or better VS 2015 maybe you've already answered but I wanted a confirmation Thanks for your help
    Massimo Callegher
  • Hi Massimo,

    computer languages are a little bit like real languages. People in the north will speak slightly different then people in the south of Italy (and other places all over the word)

    To learn the basics it does not really matter. But If you try to use your knowledge, be aware there are some different restriction in V8 World (VS 2005) or CE Word (VS 2017). All will be C# but there are local differences :-)

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

    Answer Verified By: Massimo Callegher 

  • Hi Massimo,

    I noticed the great power of the c # language

    It's great you find C# interesting and worth of learning.

    I wonder if it's good or better VS 2015

    As Volker wrote, in general some restrictions exists whether you develop for V8i or for CONNECT Edition, but mostly they are valid for C/C++ development and less for C#.

    When you will use C# only, you can you any Visual Studio version you wish, you only have to define correct NET Framework target (3.5 for V8i, 4.6.x for CE depending on Update version). So in your case, to use the latest VS makes sense, especially because newer versions provide better code quality tools.

    There are restrictions that are not defined by Visual Studio version, but C# version (langauge version). E.g. because V8i is based on NET 3.5, you can use C# 3.0 at max but not newer versions (current is C# 7.3 I guess), but for basic development, it's probably not important whether you can use async code, lamba functions etc. ;-)

    With regards,

      Jan

    Answer Verified By: Massimo Callegher