Infrastructure Map Server Developer

Reply
New Member
tanjasuikkanen5514
Posts: 1
Registered: ‎06-04-2008
Message 1 of 1 (36 Views)

Studio 2009 API DwgLoadProcedure

36 Views, 0 Replies
10-16-2008 01:05 AM
I have a problem with Studio APIs DwgLoadProcedure. My code is this:

{color:#0000ff}DwgLoadProcedure loadProcedure = new DwgLoadProcedure();

loadProcedure.SourceFiles.Add(@file);
loadProcedure.RootPath = myRoot;
loadProcedure.CoordinateSystem = coordSys;

loadProcedure.ClosedPolylinesToPolygons = false;
loadProcedure.Generalization = 100;

loadProcedure.GenerateSpatialDataSources = true;
loadProcedure.SpatialDataSourcesFolder = "Data";
loadProcedure.SpatialDataSourcesPath = "";
loadProcedure.GenerateLayers = false;
loadProcedure.GenerateMaps = false;
loadProcedure.GenerateSymbolLibraries = true;
loadProcedure.SymbolLibrariesFolder = "Symbols";
loadProcedure.SymbolLibrariesPath = "";

loadProcedure.Execute(connection);{color}

At the line {color:#0000ff}loadProcedure.Execute(connection), {color}the app throws an error:

{color:#ff0000}System.AccessViolationException was unhandled by user code
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="Autodesk.MapGuide.Studio.Dwg.Load"
StackTrace:
at BlockConverter.Convert(BlockConverter* , AcDbBlockTableRecord* )
at Autodesk.MapGuide.Studio.Load.DwgLoadProcedure.BlocksToSymbols(String srcFile, AcDbDatabase* pDb, PackageWriter pkg, SiteConnection connection)
at Autodesk.MapGuide.Studio.Load.DwgLoadProcedure.WriteSymbolsOnly(PackageWriter pkg, SiteConnection connection)
at Autodesk.MapGuide.Studio.Load.DwgLoadProcedure.Execute(String packageFilePath, SiteConnection connection)
at Autodesk.MapGuide.Studio.Load.LoadProcedure.Execute(SiteConnection connection)
{color}
{color:#000000}I've done the same with DwfLoadProcedure and that works perfectly!{color} It's something to do with the symbol library. If I make this change {color:#0000ff} loadProcedure.GenerateSymbolLibraries = false, {color:#000000}the error doesn't occur but, ...well you can imagine how a dwg looks like without a symbol library, just lines and points....

I know that in Studio 2009 they made some changes with handling dwgs. But this has to be possible somehow!

Any advices are appreaciated!

Tanja
{color}{color}

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community