We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dec82e3 commit 00ed355Copy full SHA for 00ed355
examples/Makefile.am
@@ -44,4 +44,4 @@ TESTS_ENVIRONMENT = \
44
45
TESTS = alive.test
46
47
-EXTRA_DIST = example.dwg sample.dwg suffix.c $(TESTS)
+EXTRA_DIST = example.dwg sample.dwg suffix.c load_dwg.py $(TESTS)
examples/load_dwg.py
@@ -0,0 +1,21 @@
1
+#! /usr/bin/python
2
+
3
+import libredwg
4
+from libredwg import *
5
6
+import sys
7
8
+if (len(sys.argv) != 2):
9
+ print "Usage: read_num_layers.py <filename>"
10
+ exit()
11
12
+filename = sys.argv[1]
13
+a = Dwg_Data()
14
+error = dwg_read_file(filename, a)
15
16
+if (error != 0):
17
+ print "Error!"
18
19
20
+print "Num objects: %d " % a.num_objects
21
+print "Num layers: %d" % a.layer_control.tio.object.tio.LAYER_CONTROL.num_entries
0 commit comments