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
Extracting points along a line - Python
Along a known line, I am trying to extract a list of point at set distances from the end of the line. e.g. 30cm and 65cm from the end of the line.
I have been exploring ezdxf but haven't found a simple function to achieve this.
Diagram: Known points…

edfish90
- 11
- 2
0
votes
1 answer
Rasterising only selected area of a CAD DXF file
Given a DXF file (2D CAD drawing), is it somehow possible to rasterise only part of it? Preferably in Python's ezdxf. By the part of it, I mean the selected rectangular area, not a single layer.
Background: I'm struggling to rasterise quite a big…

Dominik Filipiak
- 1,192
- 14
- 26
0
votes
1 answer
Ezdxf line quardinates
I want to get all coordinates of a line via ezdxf. I found nothing relevent. I am able to get only starting and ending points but I need all coordinates. Kindly guide.

Hannan Ma Lik
- 21
- 2
0
votes
1 answer
auto py to exe module not found ezdxf
Tried to make exe in a file, and its not import the ezdxf module correctly.
I am using spyder by anaconda.
the error:
Traceback (most recent call last):
File "Conversor - Tkinter.py", line 3, in
File…

Lucas Francklin
- 85
- 7
0
votes
1 answer
Filter LINES in all LWPOLYLINE in DXF doc using python ezdxf
How can I get the LINES coordinates from a LWPOLYLINE in a dxf doc?
I have the following code:
import sys
import ezdxf
Coordenadas = str()
Coordenadas_texto = str()
try:
doc = ezdxf.readfile(str(arq)+".dxf")
except IOError:
print('Erro de…

Lucas Francklin
- 85
- 7
0
votes
0 answers
How to convert a part of "DXF" file to picture by ezdxf with custom font?
(English is not my native languate)
I want to use ezdxf to convert 'DXF' file to picture.
as the document's example:
fig = plt.figure()
ax = fig.add_axes([0, 0, 1, 1])
ctx = RenderContext(dxf_doc)
out = MatplotlibBackend(ax)
frontend =…

lanhao945
- 427
- 5
- 21
0
votes
1 answer
Python ezdxf moving blocks
I want to move, rotate the component of the blocks in dxf file using python.
What I am thinking now is re-drawing the components, but I doubt that I cannot draw some arbitrary curves by that method. So, I want to find the way to copy and move the…

EJ Song
- 123
- 2
- 13
0
votes
1 answer
The contour detected using opencv to dxf
I used opencv to detect contours in Python. I wrote the code for saving this contour as a dxf file as below through a search.
cap = EasyPySpin.VideoCapture(0)
_, frame = cap.read()
frame = cv2.cvtColor(frame, cv2.COLOR_GRAY2BGR)
frame =…

Yamm
- 13
- 7
0
votes
1 answer
Get a layer from .dxf file and copy that layer to new file
I have tried the following code which can be found here, my objective is to take out one layer from a .dxf file, and the copy to a new file only with that information. On the link where I found the code, the made the following code, but I do not…

Sultry T.
- 69
- 10
0
votes
0 answers
Creating REGION out of a closed polyline - EZDXF
I wrote code which creates closed polyline - rectangle, and now I want to make that rectangle a region, with a EZDXF add-on.
I managed to make a region, but it doesn't recognize the polygon I drew, so it makes that region at basepoint (0,0,0) and it…
0
votes
1 answer
How to get dimensions of the shapes in .dxf file using ezdxf package in Python?
I am having drawing files in .dxf format. Each files consists of different shapes as shown in below image.
I want to read all the dimensions using Python. I come to know about ezdxf package. So I was able to load the file in Python environment and…

Hiren Kakkad
- 15
- 4
0
votes
0 answers
Is there a way to link a custom property value to a Mtext content?
I would like to link the value of a custom property to the contend of a specific Mtext.
Here's what I got so far:
i = 0
while(i
0
votes
1 answer
How to clean CSV file for a coordinate system using pandas?
I wanted to create a program to convert CSV files to DXF(AutoCAD), but the CSV file sometimes comes with a header and sometimes no and there are cells that cannot be empty such as coordinates, and I also noticed that after excluding some of the…

MrAhmedElsayed
- 83
- 2
- 9
0
votes
2 answers
How to read text location from ezdxf
I created a program that searches through multiple subdirectories, reads a specific .txt file and finds the relevant info then stores it in a list. It then needs to open a dxf, read the text, if a certain condition is met, replace the text from…
user11026232
0
votes
0 answers
Performing subtract operation between square hatches
I am able to write dxf file using Python ezdxf function which can generate a square.
But I want to draw another smaller square and want to to subtract it from bigger square to get an annular ring.
How can I do that using ezdxf function?
Here is my…

Supernova
- 25
- 4