Is there a way to do massive export of dwg file to shapefile by layer?
I have number of drawings that need to be converted to shapefile and I don't want to do export layer by layer.
there is no ready-to-use function for that, but at least a script or a small macro (lisp or vba) should do that job.
Another option (not great but may be possible): what if you export all layers into one shape file and include the layername as one of the exported attributes? You will then be able to filter by this layername-field in any SHP-visualization software.
- alfred -
I think that a Script file is the solution because it's very nice to get ONE SHP per object type / geometry :
parcels, buildings, sewer pipes, water pipes, streets names, parcels identifiers, etc ...
export all layers into one shape file and include the layername as one of the exported attributes
I would use that technique, indeed.
After _MAPEXPORT everything to a single shapefile, containing the layer name as an attribute, you can split automatically it by layer, by means of Qgis (for instance).
backing up a bit, one does not "export dwgs" to shp but rather objects with or without data attached and/or attributes, etc.
is it possible to combine your dwgs with drawing attach and make one dwg from which to export to the shp?
this gives you some options to change layer names if the names for like objects are different in the various dwgs such as layer names like road, roads, streets, highways could all be changed to ROADS so all of the traveled paths are on one layer with the object data such as number of lanes or surface type or municipality would allow theming the shp data.
I'd like to forward the credits to Alfred, since the previous suggestion belongs to him: as we say in Italy, I've only "closed the circle".
May be late to the party and don't even know if this still works in newer versions, bu this would be one way to do it.
First in a new dwg use the mapattach tools and attach all the dwgs then query in the layers you want to export. Next export to SDF and use feature classes setting the feature name by the layers. This would create a multi type SDF file with the layers names as the features(layerS) name. Then I would use something like FDO2FDO to convert the SDF file to shp files, or use bulk copy.
so regardless of how you congregate the data, back to the OP with "massive export" which is something i have not done. Could you help enlighten me, please. what is a "massive export " ? exporting en masse as with a script or very massive amounts of data"
and how many drawings is "a number"? At what point is it worth the time to write the script if one does not exist to do the task versus using something like my or Murphs suggestion?
As far as the final number of layers, all methods suggested could be used to arrive at any given number of layers. Just relative to how much you caress the data. I look at this poser as "How do I combine all the data from multiple dwgs(Maps?) into a given number of data sources of the shp fileformat ?" Am I off on that?
And by the way, are all the dwgs maps with (a) coordinate system(s) set or is there a need to go some georeferencing along the way?
Thanks for all your help folks. still learning from all of you.
Access a broad range of knowledge to help get the most out of your products and services.