AutoCAD Map 3D Developer

Reply
Valued Contributor
spatialnetbrek
Posts: 102
Registered: ‎12-08-2004
Message 1 of 3 (469 Views)

Map 2009: MapImport via C#

469 Views, 2 Replies
12-13-2010 12:17 PM

Greetings,

 

Is it possible to initialize the importer for multiple files?


This approach only processes Transformer_point2
importer.Init("SHP", "C:\\Data\\Transformer_point1.shp");
importer.Init("SHP", "C:\\Data\\Transformer_point2.shp");

 

The other approaches listed below throw exceptions
importer.Init("SHP", "C:\\Data\\*.*");
importer.Init("SHP", "C:\\Data\\*.SHP");


Don't know if the MapImport.ini is used but it is set as follows:

 

;This section determines how you want to import Shape files.
[SHP]
File=MultiSelect
;File=SingleSelect
;File=False
Driver:FDO_ARC_DEGREES_PER_EDGE=5

 

Any suggestions would be most appreciated.

 

Thanks,

 

Brek

*Expert Elite*
norman.yuan
Posts: 965
Registered: ‎04-27-2009
Message 2 of 3 (454 Views)

Re: Map 2009: MapImport via C#

12-14-2010 06:49 AM in reply to: spatialnetbrek

Whith multiple shape files to import/export, I think, you need to do it one at a time in a loop (I have an app that export Acad entities to multiple shape files that way):

 

pseudo-code:

 

foreach string shapeFileName in shapeFileNames

{

    importer.Init("SHP",shapeFileName)

    //Other importer configurations

    //Do the importing

}

 

Valued Contributor
spatialnetbrek
Posts: 102
Registered: ‎12-08-2004
Message 3 of 3 (449 Views)

Re: Map 2009: MapImport via C#

12-14-2010 11:52 AM in reply to: spatialnetbrek

Thanks Norman, that is what I was suspecting.

 

Have a good day!

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