This tag should be used for questions concerning the ezdxf Python package, a library of functions which may be used to read & manipulate DXF files.
Questions tagged [ezdxf]
92 questions
0
votes
0 answers
Ezdxf rename the block name
I need to change the name of a block, that was created in modelspace.
Can I do any operations to rename it?
I tried to use:
doc = ezdxf.readfile('newnew.dxf')
Rename insert in modelspace:
for block in msp.query('INSERT[name == "test_name"]'):…
0
votes
1 answer
extract .dxf data using ezdxf to add to a pandas dataframe
The end goal is to extract the text contained on a specific layer, inside of a named view, from the model space. I have the layer restriction (the text in yellow for visual), but I can't seem to figure out the syntax (if possible) to limit the query…

Rand0mdude
- 27
- 1
- 10
0
votes
0 answers
how to create linear dimensions in Inches in python ezdxf
given the code below, how can I change the dimension units into inches.
code:
import ezdxf
from ezdxf import units
doc = ezdxf.new('R2010', setup=True)
doc.units = units.IN
msp = doc.modelspace()
msp.add_line((0.0, 0.0),(0.0, 10.0))
dim =…

mohammad Abdelkhalek
- 11
- 2
0
votes
1 answer
ezdxf issue when creating drawing with layers
I have encountered an issue when creating a new drawing using the ezdxf library.
I need to create a new dxf drawing, AutoCAD release R2000, so I use the following commands:
doc = ezdxf.new(dxfversion='AC1015') # AutoCad Release R2000
msp =…

crazydecibel
- 95
- 9
0
votes
0 answers
ezDXF Use Visibility parameters from an imported Block
I want to set the visibility parameters (VP) of a block imported from a template DXF (V.2013). Using the Structure Browser I have found the VP are not saved with the block, they are in the object section. I guess importing the block is not enough.…

Antoni Gual Via
- 714
- 1
- 6
- 14
0
votes
0 answers
ezdxf get coords from polylines
i have problem with ezdxf. i want put polyline coords to list. i can do it when i had simple polyline in the dxf. i want separate the polylines coords to multiple list.
simple polyline to coordslist:
import ezdxf
#input file
dwg =…
0
votes
0 answers
convert jpg file to DXF file using Python
Well I'm stuck in a problem of converting my jpg file into dxf file in Python. After dxf file is created I want to open it in MS Visio which is drawing tool for making various types of diagrams.
I've found a code in Python which is used to convert…

M.Umer Haider
- 1
- 2
0
votes
0 answers
ezDXF attribute styles disappear in imported blocks
I'm using ezDXF to generate electrical schematics, using as a base a file of blocks made in AutoCAD, saved in DXF format. I import the blocks and styles to the schematics DXF using the importer, then create different pages where I insert the…

Antoni Gual Via
- 714
- 1
- 6
- 14
0
votes
0 answers
how to autosize textbox while updating text in dxf document using ezdxf
I am new to ezdxf. I have an engineering drawing in dxf format. I have to modify certain text in the existing document. I have the updations required in a dictionary. I loop through all the TEXT entities and comparing whether it is in the…

me280872
- 3
- 3
0
votes
1 answer
Dimension aligned with bottom of object using ezdxf
Needing to add some dimensions along the lower portion of a dxf created with ezdxf for clarity reasons. I used .add_aligned_dim with the points from right to left. This allowed the dimension to be placed underneath the object however, that now means…

Rand0mdude
- 27
- 1
- 10
0
votes
1 answer
How to correct variables being drawn overtop of one another (ezdxf utilizing data from openpyxl)
Trying to create a script that will create individual DXF's via ezdxf from an openpyxl import. I am using set x and y coordinates for testing purposes. The issue is that the variables "name" and "qty" seem to retain all previous assignments when…

Rand0mdude
- 27
- 1
- 10
0
votes
0 answers
ezdxf (Python) generate a technical drawning from an 3D CAD model
Got stuck while trying to generate a technical drawing in PDF with ezdxf from an OBJ model with:
a front view, a side view and a spatial view
some annotations if possible
on horizontal A3 (420 x 297 mm) paper
manage the scaling if…

Joost Döbken
- 3,450
- 2
- 35
- 79
0
votes
1 answer
Cant create text with EZDXF
Im trying to create text with ezdxf but when i open the file it doesnt show anything!
With lines etc it works. I tried with the example in the documentation but that also doesnt work!
import ezdxf
# TEXT is a basic entity and is supported by every…

swqtt
- 1
0
votes
1 answer
How to increase line width of spline with ezdxf
This is how I am increasing the width for a lwpolyline with ezdxf. How do I do this with a spline?
def line_example(self):
width = 0.1
self.msp.unit1.add_lwpolyline([(-0.5, 0.5, width, width),
…

Joe
- 1
- 1
0
votes
1 answer
Counting entities within a bounding box with ezdxf
I'm trying to select the densest (in terms contained elements) areas of a DXF layer in ezdxf.
These boxes are evenly spaced and shaped.
In other words: given a BoundingBox2d instance bbox, how to obtain number of entities (lines, poly lines,…

Dominik Filipiak
- 1,192
- 14
- 26