[Qgis-user] Convert .shp to CAD, with attribute values as different layers

Chiz Harward chiz at urban-archaeology.co.uk
Tue Feb 13 05:50:23 PST 2024


Ok, so reinstalled the Processing plugin to get my Vector tools back and did Split Vector Layer, once I found the hidden Output file type I selected .dxf as output. Press Run and get error:
QGIS version: 3.16.11-Hannover
QGIS code revision: 26cc1c76
Qt version: 5.15.2
GDAL version: 3.3.1
GEOS version: 3.9.1-CAPI-1.14.2
PROJ version: Rel. 8.1.1, September 1st, 2021
Processing algorithm...
Algorithm 'Split vector layer' starting...
Input parameters:
{ 'FIELD' : 'id', 'FILE_TYPE' : 5, 'INPUT' : 'stone_outline.shp', 'OUTPUT' : 'D:\\aUASERVER\\Projects\\UA241\\Winch_CA\\Projects\\Nave north plinth\\CAD output' }

Creating layer: D:\aUASERVER\Projects\UA241\Winch_CA\Projects\Nave north plinth\CAD output\id_0.dxf
Could not create layer D:\aUASERVER\Projects\UA241\Winch_CA\Projects\Nave north plinth\CAD output\id_0.dxf: Creation of field id failed (OGR error: DXF layer does not support arbitrary field creation, field 'id' not created.)
Execution failed after 0.07 seconds

Loading resulting layers
Algorithm 'Split vector layer' finished

Any ideas?

Chiz Harward BA MCIfA he/him
Senior Archaeologist, Urban Archaeology

I work flexibly - so whilst it suits me to email now, I do not expect a response or action outside of your own working hours

http://urban-archaeology.blogspot.com<http://urban-archaeology.blogspot.com/>
https://www.facebook.com/urb.arch/
http://gloscross-slabs.blogspot.co.uk/

Urban Archaeology
2 Slad View,
Gaineys Well,
Stroud,
Gloucestershire
GL5 1LQ
07881 486837
chiz at urban-archaeology.co.uk<mailto:chiz at urban-archaeology.co.uk>

Urban Archaeology is a trading name of Chiz Harward BA MCIfA

From: QGIS-User <qgis-user-bounces at lists.osgeo.org> On Behalf Of Chiz Harward via QGIS-User
Sent: Tuesday, February 13, 2024 1:03 PM
To: Richard McDonnell <richard.mcdonnell at opw.ie>
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] Convert .shp to CAD, with attribute values as different layers

Thanks all, will try and do this as soon as I can get the Vector drop down list to actually drop down... is there a keyboard shortcut to get to the options? Ctrl+O isn't working

Chiz Harward BA MCIfA he/him
Senior Archaeologist, Urban Archaeology

I work flexibly - so whilst it suits me to email now, I do not expect a response or action outside of your own working hours

http://urban-archaeology.blogspot.com<http://urban-archaeology.blogspot.com/>
https://www.facebook.com/urb.arch/
http://gloscross-slabs.blogspot.co.uk/

Urban Archaeology
2 Slad View,
Gaineys Well,
Stroud,
Gloucestershire
GL5 1LQ
07881 486837
chiz at urban-archaeology.co.uk<mailto:chiz at urban-archaeology.co.uk>

Urban Archaeology is a trading name of Chiz Harward BA MCIfA

From: Richard McDonnell <richard.mcdonnell at opw.ie>
Sent: Tuesday, February 13, 2024 11:16 AM
To: Chiz Harward <chiz at urban-archaeology.co.uk>
Cc: qgis-user at lists.osgeo.org
Subject: RE: Convert .shp to CAD, with attribute values as different layers

Hi Chiz,
The only thing I can think of is Split Vector Layer (Vector => Data Management) that will allow you to split your Layer by attribute, outputting a DXF for each layer.
The only issue is that you will have a series of separate Layers which you will have to manually merge into a single dxf file.

One other consideration would be, splitting the single layer by attribute in QGIS as separate Layers and then exporting the Project.....
Sorry I can't be of more help, there's probably a way, using Python, to carry out the split and write out a single DXF, but I can't help you there.
Kind Regards,

Richard



--
Richard McDonnell MSc GIS, FME Certified Professional
Geographical Information Systems Officer

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw

--
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/


--
MSc GIS, FME Certified Professional

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://https://gov.ie/opw<https://www.opw.ie>

--
Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/<https://www.opw.ie/en/disclaimer/>
From: QGIS-User <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> On Behalf Of Chiz Harward via QGIS-User
Sent: 13 February 2024 10:04
To: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Convert .shp to CAD, with attribute values as different layers

Hallo, I have a shapefile that has attributes and need to convert this to a CAD file. I can do this by export project to dxf, but it comes through with one CAD layer per shapefile. I need to have the shapefile come through as different CAD layers according to one of the attribute fields.

Example: Shapefile contains many polygons, the attribute field 'colour' of each polygon can be red, blue, green etc. I need it to get it into CAD with a layer for the red polygons, one for the blue, one for green etc

Running QGIS 3.16.11 Hannover
Any help appreciated

Chiz Harward BA MCIfA he/him
Senior Archaeologist, Urban Archaeology

I work flexibly - so whilst it suits me to email now, I do not expect a response or action outside of your own working hours

http://urban-archaeology.blogspot.com<http://urban-archaeology.blogspot.com/>
https://www.facebook.com/urb.arch/
http://gloscross-slabs.blogspot.co.uk/

Urban Archaeology
2 Slad View,
Gaineys Well,
Stroud,
Gloucestershire
GL5 1LQ
07881 486837
chiz at urban-archaeology.co.uk<mailto:chiz at urban-archaeology.co.uk>

Urban Archaeology is a trading name of Chiz Harward BA MCIfA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20240213/f073b980/attachment.htm>


More information about the QGIS-User mailing list