Hi,
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.
Thanks
Hi,
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 -
Hello
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 ...
Bye, Pat
Patrice BRAUD
alfred.neswadba wrote:
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.
dave
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.
dave
By "massive export" I meant routine that may allow to export all drawing content to shapefile and separate it by layer. However, I don't know how to separate points, polygons and lines.
The number of drawings wasn't big and I already did export but would be interesting to have something like this in arsenal.
Vasily_BC wrote:I don't know how to separate points, polygons and lines.
You should simply run the _MAPEXPORT routine three times, because Autocad will filter the right objects for you, sir.
When you export select the Shape MultiClass file format. It will create mulitple shp files from each type of object.
That's nice, Murph, but I haven't it in my Map2006: do you know since which release is it available..?
@antoniovinci wrote:That's nice, Murph, but I haven't it in my Map2006: do you know since which release is it available..?
I want to say 2008 but I know it was in 2010.
Hi,
>> I want to say 2008 but I know it was in 2010.
Verified now: Civil3D 2008 (and so I assume Map3D 2008) was the first version which included Multiclass SHP export.
- alfred -
Hello
I vote for MAPEXPORT one (or a few) layer(s) by layer(s) OR one geometry by one geometry
with the help of a script file which freeze all layers except the layers for the next MAPEXPORT
and etc ...
( You can include the LAYERNAME as an attribute if necessary )
It's easy and reliable ...
It can run with ANY version of MAP/CIVIL : 2004-2014
http://www.cadtutor.net/forum/showthread.php?t=22519
(command "._mapexport" "SHP" "C:\\temp\\test.shp" "_N" "_S" "_LINE" "_ALL" "*" "*" "_N" "_Proceed")
Bye, Pat
Patrice BRAUD
HI Murph,
you are amaging,
i read so may post of your, you have a perfect solution for any problem..
Thanks it works no eed of any routine option is available in mapexport. command
@Anonymous wrote:
HI Murph,
you are amaging,
i read so may post of your, you have a perfect solution for any problem..
Thanks it works no eed of any routine option is available in mapexport. command
Your welcome, too bad I wasn't able to get employment back in the field of mapping and geospatial. 😞