Export WFS to DWG with attributes by layer

Export WFS to DWG with attributes by layer

radulowYE6J2
Contributor Contributor
1,585 Views
5 Replies
Message 1 of 6

Export WFS to DWG with attributes by layer

radulowYE6J2
Contributor
Contributor

Hi 

 

I am not that new to AutoCad and GIS handling, but I cant seem to make this work.

https://knowledge.autodesk.com/support/autocad-map-3d/learn-explore/caas/CloudHelp/cloudhelp/2020/EN...

I want to export a map as a dwg-drawing and want to move the styling of the feature-layer over to the regular dwg-layer as a default. As an example: my buildings on feature-layer "RESF" are styled as empty polygons with red outlines on the map. When I export  the map to dwg, the buildings (as an object, and object color) appear red (255,0,0) , but the layer color setting is default on black. I want the layer default setting to be red and the object to come as color: bylayer

 

What am I missing?

0 Likes
1,586 Views
5 Replies
Replies (5)
Message 2 of 6

ChicagoLooper
Mentor
Mentor

Hello @radulowYE6J2 
So you’re connecting to a WFS server in Map3D, correct? Would it be possible to to share your WFS url for troubleshooting? Thx.

Chicagolooper

EESignature

0 Likes
Message 3 of 6

radulowYE6J2
Contributor
Contributor

Hi

 

yes, thats right. This is the public wfs-url of switzerland:

https://geodienste.ch/db/av_0

There is no login. And be careful, there is a lot of data, therefore try to use only the 18th feature "Liegenschaften" - property.  I also filter the connection with "BFSNr = 2952". This is only one of the municipalities of switzerland.

0 Likes
Message 4 of 6

ChicagoLooper
Mentor
Mentor

Hello @radulowYE6J2 

 

You can try this:

  1. Assign your coordinate system=>Add your WFS data to modelspace=>Create the STYLE=>Right click the layer in the Map Task Pane=>Save Layer=>Name and SAVE with .layer extension. See image--1.
  2. Open a new drawing. Assign your coordinate system=>Right click 'white space' on the Map Task Pane=>Data=>Load Layer. See image-2.

Image-1Image-1

 

Image-2Image-2

 

ANOTHER OPTION: Add the WFS, then download and Save the WFS in SDF format. 

  1. Add the WFS data to modelspace.
  2. Right click the layer in the Map Task Pane=>Export Layer Data to SDF format.
  3. Name and SAVE the SDF in your project folder.
  4. Turn off (uncheck) the WFS on the Map Task Pane.
  5. Add the new SDF using a Data Connection and apply your STYLE to the SDF.
  6. Right-click the SDF in Map Task Pane then choose Save Layer from shortcut menu=>Name and save the Layer.
  7. Open a new drawing. Assign your coordinate system=>Right click 'white space' on the Map Task Pane=>Data=>Load Layer.

Chicagolooper

EESignature

0 Likes
Message 5 of 6

radulowYE6J2
Contributor
Contributor

Thanks for the explanation, but this is not what I was looking for.

*.layer and *.sdf will only give me interoperability between AutoCad Map 3D files. I need a *.dwg export for other CAD-programs like Revit or Archicad, and no, the native *.dwg save file of AutoCad Map 3D doesn't work. 

The native file has only 1 layer named "0" and different data layers I connected through WFS (RESF) (Image 1).

When I export a *.dwg, AutoCad transfers the data layers to regular dwg layers. So there is not only a "0" layer, but a "RESF" and "TBBI" and so on (Image 2).

 

 

Screenshot 2022-06-05 121215.jpg

Screenshot 2022-06-05 121303.jpg

  

My problem is that the wfs-layer styling doesnt conevert to regular layer styling, eventhough i specify a *.dwt file as a conversion table at the export promt of AutCad Map 3D. I would have to change the style manually every time I want to export something out of Map 3D.

 

the regular layer styling is black in the exported file but the objects are red (Image 3). I want the layer styling to be red and the objects to be "by layer".

 

This worked, but is very inconvinient:

- prepare a dwt file with regular-layer styling names exactly as wfs-layers names

- export dwg from AutoCad Map 3D

- open new and empty file and use the prepared dwt

- "insert" exported dwg as a block

- explode block

- select everything

- change properties to "by layer"

 

Screenshot 2022-06-05 122626.jpg

Its somehow pointless to define a conversion table in the dwg-export when the exported file didn't use this table. 

 

0 Likes
Message 6 of 6

ChicagoLooper
Mentor
Mentor

Hi @radulowYE6J2 

You're confused and not doing it right. Your layers in your uploaded dwt do not have the correct WFS layers.

 

Your template layers are not consistent with the WFS layers. The layers in your template must be exactly like the layers shown in the Map Task Pane. If you go back and copy the layer names correctly, then you can export the layers from the Map Task Pane to SDF format. Your Layer Properties Manager in post #5 should look like this. Refer to image-1.

Image-1Image-1

 

Once exported, the SDF's can then be added to a new dwg using the MAPIMPORT command. The new dwg can then be saved to your project folder for future reference and since it's in dwg format, non-Map3D users can access it freely. 

 

MapImport, which is a native command in Map3D, can be entered on the command line. Or, if you prefer the RIBBON go to Insert Tab=>Import Panel=>Map Import Icon. Here's a video that demonstrates how to export WFS layers to SDF format. The video also demonstrates how to use the MapImport command to convert from SDF to plain vanilla polylines and Mtext.

 

<<NOTE: The export to SDF must be done individually, you cannot Export more than one layer at a time. Also, with MapImport, you must add each SDF individually, you cannot Import more than one SDF at a time.>>

 

Once you have your reference file (your template layers like image-1) with the layer names, layer colors, line weight and line type, you may adjust them to your liking in Layer Properties Manager. Finally, you may now delete and disconnect the WFS layers, you don't need them anymore.
 

Chicagolooper

EESignature