![]() |
【转帖】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 |
所有的时间均为北京时间。 现在的时间是 03:06 PM. |