AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Map 2009: MapImport via C#

2 REPLIES 2
Reply
Message 1 of 3
spatialnetbrek
746 Views, 2 Replies

Map 2009: MapImport via C#

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

2 REPLIES 2
Message 2 of 3

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

}

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3

Thanks Norman, that is what I was suspecting.

 

Have a good day!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost