[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libredwg] [bug #32186] Dwg_Object list iteration always returns the fir
From: |
Rodrigo Rodrigues da Silva |
Subject: |
[libredwg] [bug #32186] Dwg_Object list iteration always returns the first entity (in Python) |
Date: |
Thu, 20 Jan 2011 07:35:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; pt-BR; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13 |
URL:
<http://savannah.gnu.org/bugs/?32186>
Summary: Dwg_Object list iteration always returns the first
entity (in Python)
Project: LibreDWG
Submitted by: pitanga
Submitted on: Thu Jan 20 05:35:39 2011
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I'm trying to use the libreDWG with python binding on my debian machine but I
get some troubles..
I'm trying to open a dwg file and read the content of it for creating the
entites on PythonCAD.
I'm doing as following:
from libredwg import *dwg=Dwg_Data()dwg_read_file("example.dwg",dwg)
#loop on entities for i in range(0,dwg.num_objects): dwg.object.index=i
print "-> " , dwg.object.supertype
print "-> " , dwg.object.type
but it loop always on the some entity ..supertype is always 2 and type is 48
I Also try dwg.object[i] but this method fails as suggest in dwg_ps.c
Dwg_Object *obj; for (i = 0; i < dwg->num_objects; i++) { obj =
&dwg->object[i]; if (obj->supertype = DWG_SUPERTYPE_UNKNOWN) // unknown
continue; if (obj->type = DWG_SUPERTYPE_OBJECT) // not entity
continue;
(reported by Matteo Boscolo)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32186>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [libredwg] [bug #32186] Dwg_Object list iteration always returns the first entity (in Python),
Rodrigo Rodrigues da Silva <=