1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
BlockRecord
===========
.. module:: ezdxf.entities
:noindex:
BLOCK_RECORD (`DXF Reference`_) is the core management structure for
:class:`~ezdxf.layouts.BlockLayout` and :class:`~ezdxf.layouts.Layout`.
This is an internal DXF structure managed by `ezdxf`, package users don't have
to care about it.
======================== ==========================================
Subclass of :class:`ezdxf.entities.DXFEntity`
DXF type ``'BLOCK_RECORD'``
Factory function :meth:`Drawing.block_records.new`
======================== ==========================================
.. class:: BlockRecord
.. attribute:: dxf.owner
Handle to owner (:class:`~ezdxf.sections.table.Table`).
.. attribute:: dxf.name
Name of associated BLOCK.
.. attribute:: dxf.layout
Handle to associated :class:`~ezdxf.entities.layout.DXFLayout`, if
paperspace layout or modelspace else "0"
.. attribute:: dxf.explode
1 for BLOCK references can be exploded else 0
.. attribute:: dxf.scale
1 for BLOCK references can be scaled else 0
.. attribute:: dxf.units
BLOCK insert units
=== ===================
0 Unitless
1 Inches
2 Feet
3 Miles
4 Millimeters
5 Centimeters
6 Meters
7 Kilometers
8 Microinches
9 Mils
10 Yards
11 Angstroms
12 Nanometers
13 Microns
14 Decimeters
15 Decameters
16 Hectometers
17 Gigameters
18 Astronomical units
19 Light years
20 Parsecs
21 US Survey Feet
22 US Survey Inch
23 US Survey Yard
24 US Survey Mile
=== ===================
.. autoproperty:: is_active_paperspace
.. autoproperty:: is_any_paperspace
.. autoproperty:: is_any_layout
.. autoproperty:: is_block_layout
.. autoproperty:: is_modelspace
.. autoproperty:: is_xref
Internal Structure
------------------
Do not change this structures, this is just an information for experienced
developers!
The BLOCK_RECORD is the owner of all the entities in a layout and stores them
in an :class:`~ezdxf.entitydb.EntitySpace` object (:attr:`BlockRecord.entity_space`).
For each layout exist a BLOCK definition in the BLOCKS section, a reference to
the :class:`~ezdxf.entities.Block` entity is stored in :attr:`BlockRecord.block`.
:class:`~ezdxf.layouts.Modelspace` and :class:`~ezdxf.layouts.Paperspace`
layouts require an additional :class:`~ezdxf.entities.DXFLayout` object
in the OBJECTS section.
.. seealso::
More information about :ref:`Block Management Structures` and
:ref:`Layout Management Structures`.
.. _DXF Reference: http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-A1FD1934-7EF5-4D35-A4B0-F8AE54A9A20A
|