修改块中对象的层属性又是怎样修改的
知道了
先在当前空间遍历块,找到块后修改以下是VC代码
CString oldlayername;
CString newlayername;
oldlayername="oldlayer";
newlayername="newlayer";
for(int i=0;i< m_acadblocks.GetCount();i++)
{
m_acadblock.AttachDispatch(m_acadblocks.Item(COleVariant((short)i)),true);
for(int j=0;j< m_acadblock.GetCount();j++)
{
m_acadentity=m_acadblock.Item(COleVariant((short)j));
if(!strcmp(oldlayername,m_acadentity.GetLayer()))
m_acadentity.SetLayer(newlayername);
}
} 有没有VB的代码了?
页:
[1]