Python Forum
dxfgrabber - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: dxfgrabber (/thread-2093.html)



dxfgrabber - elhetch - Feb-18-2017

i would like to know how to use this library to get a start point of a line from DXF  ,


RE: dxfgrabber - sparkz_alot - Feb-18-2017

Have you tried the documentation? The links are here: https://pypi.python.org/pypi/dxfgrabber


RE: dxfgrabber - elhetch - Feb-18-2017

i tried , but did not understand it , i


RE: dxfgrabber - snippsat - Feb-18-2017

(Feb-18-2017, 02:56 PM)elhetch Wrote: i tried , but did not understand it , i
You most explain what you do not understand.
Here is a quick test,i install with pip install dxfgrabber
I use a test.dxf file to test with.
Here is install and test with Python 3.6.
C:\Python36\web_scrape
λ C:\Python36\web_scrape\Scripts\activate.bat
(web_scrape) C:\Python36\web_scrape
λ pip install dxfgrabber
Collecting dxfgrabber
  Downloading dxfgrabber-0.8.3-py2.py3-none-any.whl
Installing collected packages: dxfgrabber
Successfully installed dxfgrabber-0.8.3

(web_scrape) C:\Python36\web_scrape
λ ptpython
>>> import dxfgrabber

>>> dxf = dxfgrabber.readfile("test.dxf")
>>> print("DXF version: {}".format(dxf.dxfversion))
DXF version: AC1015

>>> header_var_count = len(dxf.header) # dict of dxf header vars
>>> header_var_count
199



RE: dxfgrabber - elhetch - Feb-18-2017

i dont understand how to write the code that return the start point of a line inside the drawing,
below is my code :
import dxfgrabber
dxf = dxfgrabber.readfile("test.dxf")
print("DXF version:{} ".format(dxf.dxfversion))
start=dxfgrabber.line.start
print start

it return a message that module object has no attribute Line.
it return the version but not the line start point


RE: dxfgrabber - nilamo - Mar-28-2017

(Feb-18-2017, 03:31 PM)elhetch Wrote: start=dxfgrabber.line.start
print start

it return a message that module object has no attribute Line.
it return the version but not the line start point

emphasis added.  You obviously haven't shown us your actual code, since you're trying to use ".line" (lowercase), while the error is saying ".Line" (uppercase) doesn't exist.

We can't guess what you're doing.  Please copy-paste the actual error message, and whatever code you're actually using.