[gdal-dev] Using GDAL OGR for .NET in AutoCAD bug

popovictamara popovictamara91 at hotmail.com
Mon Apr 6 01:11:02 PDT 2020


Hi,

I am using GDAL OGR .NET wrappers in my AutoCAD Civil 3D Plugin. I use it to
read datasource and convert it to AutoCAD entities. But after I use it, i
get errors in AutoCAD. Some native AutoCAD commands seem to be gone, like
MPolygon or APPLOAD. When I try to use them AutoCAD returns Unknown command
error. And this happens right after i use these three lines of code:

     [CommandMethod("GDALConfigure")]
        public static void ConfigureGDALOGR()
        {
            GdalConfiguration.ConfigureGdal();
            GdalConfiguration.ConfigureOgr();

            Ogr.RegisterAll();
        }

After I call this command in Civil 3D, he starts to act very stange. I
should also mention that this only happens in Civil 3D, on plain AutoCAD and
AutoCAD Map 3D everything is fine. It seems like OGR dll-s conflict with
some internal Civil 3D stuff. I would appreciate any suggestions on dealing
with this problem, since I wouldn't like to give up using OGR for
reading/writing vector data. I find  it very practical.

Best regards,
Tamara Popovic



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list