查看单个帖子
旧 2009-05-06, 02:39 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)