Viz Studio 2013 error when include MicrostationAPI.h

Hello,


After one full evening of research, I decided to post my nooby problem here. Basically, I just want to start a microstation project in Viz Studio 2013.

I had both include Microstation :

MicroStation\mdl\include
MicroStation\mdl\MicroStationAPI


Into the main file, I added

#define winNT
#include <MicroStation.API>
BEGIN_BENTLEY_NAMESPACE

That's all, but compiler returns me many error (14), these are the 4 firsts :

Error    1    error C2146: syntax error : missing ';' before identifier 'size_type'    c:\users\tom\bentley\microstation\mdl\include\memutilallocator.h    42    1    MdlTEST
Error    2    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int    c:\users\tom\bentley\microstation\mdl\include\memutilallocator.h    42    1    MdlTEST
Error    3    error C2146: syntax error : missing ';' before identifier 'difference_type'    c:\users\tom\bentley\microstation\mdl\include\memutilallocator.h    43    1    MdlTEST
Error    4    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int    c:\users\tom\bentley\microstation\mdl\include\memutilallocator.h    43    1    MdlTEST

Anyway, I cannot do anything, it's always wrong somewhere into these files.

Of course I checked all http://www.la-solutions.co.uk/content/Publications-MDL.htm#ArticleIndexDevTools, thanks Jon, but I couldn't find a solution.

Could you see what's wrong ??

Thank you and have a nice day

Tom

Parents Reply
  • Tom Laruve said:
    I saw JMDL

    Obsolete!  Do not use!  Read this article about MicroStation Development Languages

    Tom Laruve said:
    I cannot use Visual C/C++ 6.0 because it doesn't exist anymore

    Only if you take out an MSDN subscription.

    MicroStation VBA

    Tom Laruve said:
    My goal is really easy just open a DGN file, read the elements from it and close it

    MicroStation VBA is the answer.  It's delivered with all versions of MicroStation V8.  It works the same on all versions.  It's independent of problems such as compiler and operating system versions.

    Open a DGN file ...

    Sub OpenDesignFile()
        Application.OpenDesignFile "C:\folder\Laruve.dgn"
    End Sub

    Scan the active model...

    Sub ScanActiveModel()
        Dim oElements As ElementEnumerator
        Dim oCriteria As New ElementScanCriteria
        oCriteria.ExcludeNonGraphical
        Set oElements = ActiveModelReference.Scan(oCriteria)
        Do While oElements.MoveNext
            Dim oElement As Element
            Set oElement = oElements.Current
            Debug.Print "Element ID " & _
               DLongToString(oElement.ID) & _
               " type " & CStr(oElement.Type)

        Loop
    End Sub

     
    Regards, Jon Summers
    LA Solutions

Children