几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】how to get all entities associated with a layer (http://www.dimcax.com/hust/showthread.php?t=16673)

yang686526 2009-05-06 02:39 PM

【转帖】how to get all entities associated with a layer
 
how to get all entities associated with a layer..
how to get all entities associated with a layer..
hi,
i am reading dwg file, which may have x-refs..
i want to get all entities which have same layer say layer01..
is it possible to get entities from xrefs also having layer01 in same list??
odreadex is a superb exampleof how to do that
if you run the odreadex program against the .dwg file, you will note that it prints out the layer of every item in the database. if you follow its logic, you'll see how it walks the entire database and gets everything in it.
it is a very well written program. i found it to be very useful.
you'll need similar logic to filter objects for the layer you care about.
zetek.
sorry i am new to this od, so dont know where is that code..
could you please tell me from where i can get this code sample?
or is it possible for you to send it across..
look into \examples\odreadex folder (from nonlibs.zip)
sergey slezkin


所有的时间均为北京时间。 现在的时间是 09:08 AM.