gdi explorer and vba

Hi ,

 

i want to programmatically open and query a oracle spatial graphical source.

Is there any sample code available ?

Thanks, Stefan.

 

  • Stefan,

    You will most likely have to use regasm.exe to manually register the generated type library, something that is done automatically when Visual Studio compiles the assembly if the projects "Build > Output > Register for COM interop" option is enabled. I believe the regasm.exe tool is normally installed as part of the .NET Framework such as C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe which you could check for with a...

    dir %SystemRoot%\Microsoft.NET\Framework\regasm.exe /s

    ...command. You would then need to add the appropriate PATH to a command shell such as done be the Visual Studio delivered vsvars32.bat batch file. After doing so you should be able to use regasm.exe to perform the registration of the type library using a command as...

    regasm Bentley.Geospatial.Extensions.Oracle.dll /tlb:Bentley.Geospatial.Extensions.Oracle.tlb

    ...which should produce output similar to the following:

    Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.5420
    Copyright (C) Microsoft Corporation 1998-2004.  All rights reserved.

    Types registered successfully
    Assembly exported to 'I:\source\xfmOracleExtensions\bin\Debug\Bentley.Geospatial.Extensions.Oracle.tlb', and the type library was registered successfully

    I'm sure a search on the web for COM interop assembly registration and regasm will reveal more.

    Regards,

    Jeff Bielefeld [Bentley]



  • Jeff,

    got it running. Had to use the /codebase switch in regasm.

    Thanks a lot.

  • ...okay very good Stefan, thank you for that confirmation.

    Regards,

    Jeff Bielefeld [Bentley]