Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dxfgrabber
#1
i would like to know how to use this library to get a start point of a line from DXF  ,
Reply
#2
Have you tried the documentation? The links are here: https://pypi.python.org/pypi/dxfgrabber
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
i tried , but did not understand it , i
Reply
#4
(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
Reply
#5
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
Reply
#6
(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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  dxfgrabber-return lines start point elhetch 3 4,647 Feb-26-2017, 12:28 PM
Last Post: buran
  dxfgrabber elhetch 2 3,471 Feb-23-2017, 04:12 PM
Last Post: Larz60+
  dxfgrabber elhetch 7 8,530 Feb-21-2017, 11:15 AM
Last Post: elhetch

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020