高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】exploding blocks and polylines
exploding blocks and polylines
exploding blocks and polylines
hello,
as the drawing is being read or loaded by dwgdirect, can you explode certain entities such as blocks and/or polylines by specifying the entity type? or do you have to wait till the drawing is completely loaded, search the database for the entities, and explode these individually.
for example,
while loading loop ...
{
if polyline - explode
else
if block - explode
}
sample code will be appreciated.
no its impossible. even in case of partial loading to detect the type of entity you need to load it.
btw, the only related thing is plinetype system variable which controls if oddb2dpolyline should be converted to oddbpolyline (lightweight) while loading.
sergey slezkin
thanks sergey.
okay, let us assume that the drawing is loaded and you have a handle to pdb.
how do you iterate thru the all the loaded entities in the database by entity type, say lwpolyline, and explode these to native lines, and arcs?
i would assume that if a block is encountered you have to explode the block first.
if not in a block, how do you explode just the pline?
to explode all polylines you need to iterate the block table and for all blocktablerecords iterate through all entities.
to explode block references you need iterate layout blocks and process all block reference entities.
note that result of explode is appended to the end of block table record. so you need iterate through model space only once.
sergey slezkin
thanks sergey,
this is very helpful..
|