Skip to content

Commit

Permalink
Add more options to the Export to DXF dialog (#9108)
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored Aug 9, 2024
2 parents 3d3c3eb + 10fe3b7 commit ada65ed
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 24 deletions.
56 changes: 32 additions & 24 deletions docs/user_manual/managing_data_source/create_layers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,13 @@ single layer to another format, including :file:`*.DXF`, QGIS provides another
tool to export multiple layers as a single DXF layer. It's accessible in the
:menuselection:`Project --> Import/Export --> Export Project to DXF...` menu.

.. _figure_create_dxf:

.. figure:: img/export_dxf.png
:align: center

Exporting a project to DXF dialog

In the :guilabel:`DXF Export` dialog:

#. Provide the destination file.
Expand All @@ -515,22 +522,25 @@ In the :guilabel:`DXF Export` dialog:
#. Select the :guilabel:`CRS` to apply: the selected layers will be reprojected
to the given CRS.
#. Select the layers to include in the DXF files either by checking them in the
table widget or automatically picking them from an existing :ref:`map theme
<map_themes>`.
table widget or automatically picking them from an existing :ref:`map theme <map_themes>`.
The :guilabel:`Select All` and :guilabel:`Deselect All` buttons
can help to quickly set the data to export.

For each layer, you can:

* Override the output layer name without altering the original project
layer. For this, click on a layer name on the dialog's layers panel and
set the output layer name.
* Override the output layer name without altering the original project layer.
For this, click on the :guilabel:`Layer` name in the dialog and
write the output name to use.

* :guilabel:`Output layer attribute`: Choose whether to export all the features
in a single DXF layer or rely on a field whose values are used
to split the features into layers in the DXF output.
In the latter case, each layer will take its name from the corresponding field value.
* :guilabel:`Allow data defined symbol blocks`:
* :guilabel:`Maximum number of symbol blocks`: creates symbol blocks up to the specified limit,
starting with the ones containing the highest number of references.
The other symbols are written as they are. ``-1`` means no limitation.

* Choose whether to export all the features in a single DXF layer or rely on
a field whose values are used to split the features into layers in the DXF
output. In the latter case, each layer will take its name from the
corresponding field value.

Optionally, you can also choose to:

* |unchecked| :guilabel:`Use the layer title as name if set` instead of the
Expand All @@ -539,29 +549,27 @@ Optionally, you can also choose to:
* |unchecked| :guilabel:`Export features intersecting the current map extent`;
* |unchecked| :guilabel:`Force 2d output (eg. to support polyline width)`;
* |checkbox| :guilabel:`Export label as MTEXT elements` or TEXT elements;
* |unchecked| :guilabel:`Use only selected features`.
* |unchecked| :guilabel:`Use only selected features`;
* |unchecked| :guilabel:`Export lines with zero width`: all the lines are exported
with minimal width ``0`` (hairline) if enabled.
This helps keep the lines minimal in the file regardless of the zoom level,
and can be handy for doing further CAD-editing with the exported dxf,
especially if there are many features next to each other on the map.

.. _figure_create_dxf:
.. note::

.. figure:: img/export_dxf.png
:align: center
The precedence for defining the output layer name is as follows:

Exporting a project to DXF dialog
1. The field value from :guilabel:`Output layer attribute`
2. The overridden name in :guilabel:`Layer` column
3. The :guilabel:`Use the layer title as name if set` option
4. The layer name

Current settings defined in the :guilabel:`DXF Export` dialog may be stored in
an XML file for reusing them in other sessions. For this, the
:guilabel:`Settings` combo box has two options: :guilabel:`Load Settings from
File...` and :guilabel:`Save Settings to File...`.

.. note::

The precedence for defining the output layer name is as follows:

1. Output layer attribute (if any).
2. Overridden name (if any).
3. Layer title (if the corresponding option is checked and if a title has been set in layer properties).
4. Layer name.


.. _paste_into_layer:

Expand Down
Binary file modified docs/user_manual/managing_data_source/img/export_dxf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/user_manual/processing_algs/qgis/vectorgeneral.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,8 @@ Parameters
**Allow data defined symbol blocks** [boolean] (``buildDataDefinedBlocks``)

**Maximum number of symbol blocks** [number] (``dataDefinedBlocksMaximumNumberOfClasses``)
``-1`` means no limitation.

* - **Symbology mode**
- ``SYMBOLOGY_MODE``
- [enumeration]
Expand Down

0 comments on commit ada65ed

Please sign in to comment.