查看单个帖子
旧 2009-05-06, 03:57 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】inserted block is not editable

inserted block is not editable
inserted block is not editable
hi all,
i added new block into model space. i added entities into that block. when i open generated dxf file entities i found that entities on model space are editable but entities on inserted block are not editable.
please help what can i do so entities on block are become editable.
added here with code for reference.
---------------------------------------
oddbobjectidarray objarr;
oddbdatabaseptr pdb;
oddbblocktableptr ptable = pdb->getblocktableid().safeopenobject(oddb::kforwrite) ;
oddbblocktablerecordptr precord = oddbblocktablerecord::createobject();
/************************************************** ********************/
/* block must have a name before adding it to the table. */
/************************************************** ********************/
precord->setname(name);
/************************************************** ********************/
/* add the record to the table. */
/************************************************** ********************/
int insertblkid = objarr.append(ptable->add(precord));
oddbblocktablerecordptr pmainblk = objarr.at(mainblkid).safeopenobject(oddb::kforwrit e);
oddbobjectid brefid;
// create the new insert entity.
oddbblockreferenceptr pblkref = oddbblockreference::createobject();
brefid = pmainblk->appendoddbentity(pblkref);
// set the remaining entity properties.
pblkref->setblocktablerecord(objarr.at(insertblkid));
pblkref->setscalefactors(odgescale3d(xscale, yscale, 1.0));
pblkref->setposition(odgepoint3d(xpos, ypos, 0));
return objarr.append(brefid);
it depends on application you are trying to edit entities in block with.
autocad allows block contents editing with bedit command.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)