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/


Reply via email to