It is possible to examine the content of block references as "virtual" entities, this entities are located at the "exploded" positions, but are not stored in the entity database, have no handle and are not assigned to any layout.
This is an experimental feature and good enough for simple tasks, but not everything will work as expected
from a CAD application, as example non uniform scaling returns incorrect results for text entities (TEXT
,
MTEXT
, ATTRIB
) and some other entities like ELLIPSE
, SHAPE
, HATCH
with arc or ellipse path segments
and POLYLINE
/LWPOLYLINE
with arc segments.
Virtual entities are also supported by LWPOLYLINE
and 2D/3D POLYLINE
, POLYMESH
, POLYFACE
and
DIMENSION
entities. This entities will be broken down to LINE
, ARC
, 3DFACE
and TEXT
entities.
The "explode" feature add the "virtual" entities to the drawing entity database and places this entities at a target layout, which is the same layout as for the source entity by default and delete the source entity. All limitations of "virtual" entities apply also to the "explode" feature.
Insert.add_auto_attribs()
add ATTRIB
entities defined as ATTDEF
in the block layout and fill tags
with values defined by a dict
, this method avoids the wrapper block of the
BaseLayout.add_auto_blockref
method, but the visual results may not match the results of CAD applications,
especially for non uniform scaling.
If the visual result is very important to you, use the add_auto_blockref()
method.
Get/set hyperlinks for graphical DXF entities.
ezdxf can read and write binary encoded DXF files. The binary DXF format is also supported by
the r12writer
add-on, but not by the iterdxf
add-on.
DXF files containing ACSH_SWEEP_CLASS
objects which are saved as binary DXF by ezdxf can not be opened
by AutoCAD, this is maybe also true for other 3rd party entities. BricsCAD opens this binary DXF files
without complaining, but saves the ACSH_SWEEP_CLASS
entities as ACAD_PROXY_OBJECT
when writing back,
so error analyzing is not possible without the full version of AutoCAD.
Use an installed ODA File Converter for
converting between different versions of .dwg
, .dxb
and .dxf
.
The ODA File Converter has to be installed by the user, the application is available for Windows XP, Windows 7 or later, Mac OS X, and Linux in 32/64-bit RPM and DEB format.
At least at Windows the GUI of the ODA File Converter pops up on every call.
Insert.block()
returns associated BlockLayout()
or None
if block not exist or is an XREFInsert.has_scaling
returns True
if any axis scaling is appliedInsert.has_uniform_scaling
returns True
if scaling is uniform in x-, y- and z-axis.Insert.scale(factor)
set uniform scaling.Insert.virtual_entities()
yields 'virtual' entities of a block reference (experimental)Insert.explode()
explode block reference entities into target layout (experimental)Insert.add_auto_attribs()
add ATTRIB entities defined as ATTDEF in the block layout and fill tags
with values defined by a dict
(experimental)LWPolyline.virtual_entities()
yields 'virtual' LINE and ARC entitiesLWPolyline.explode()
explode LWPOLYLINE as LINE and ARC entities into target layoutPolyline.virtual_entities()
yields 'virtual' LINE, ARC or 3DFACE entitiesPolyline.explode()
explode POLYLINE as LINE, ARC or 3DFACE entities into target layoutDimension.virtual_entities()
yields 'virtual' DXF entitiesDimension.explode()
explode DIMENSION as basic DXF entities into target layoutDimension.transform_to_wcs()
support for UCS based entity transformationDimension.override()
returns DimStyleOverride()
objectDimension.render()
render graphical representation as anonymous blockBlock()
properties is_anonymous
, is_xref
and is_xref_overlay
R12FastStreamWriter.add_polyline_2d()
, add 2D POLYLINE with start width, end width and bulge value supportEllipse.minor_axis
property returns minor axis as Vector
ezdxf.options.write_fixed_meta_data_for_testing
, writes always same timestamps and GUIDezdxf.proxygraphic.ProxyGraphic()
class to examine binary encoded proxy graphic (Need more example data for testing!)odafc
add-on to use an installed ODA File Converter for reading and writing DWG filesr12writer
add-onR12FastStreamWriter.add_polyline()
, add 3D POLYLINE only, closed flag supportInsert.ucs()
to Insert.brcs()
which now returns a BRCS()
objectPolyline.close()
, Polyline.m_close()
and Polyline.n_close()
can set and clear closed state.Dimension.destroy()
should not not destroy associated anonymous block, because if DIMENSION is used in a
block, the anonymous block may be used by several block referencesintersection_line_line_2d()
Polyline.transform_to_wcs()
for 2d polylinesconst_width=0
Face3d.set_edge_visibility()
set inverted state (visible <-> invisible)AcDbEntity
group codes from base classexplode.virtual_block_reference_entities()
Vector.angle_between()
(Matt Broadway)Hatch.has_critical_elements()
XData.get()
now raises DXFValueError
for not existing appids, like all other methods of the XData()
classLayer.description
returns an empty string for unknown XDATA structure in AcAecLayerStandard
Hatch
edge coordinates as Vec2()
objectsvirtual_block_reference_entities()
(Matt Broadway) BlockLayout()
properties can_explode
and scale_uniformly
Hatch.remove_association()