www.mxdraw.com
内容索引主面
前一个向上下一个
McDbBlockReference::explode 方法

打碎块

C++
virtual Mcad::ErrorStatus explode(McDbVoidPtrArray& entitySet) const;
参数 
说明 
McDbVoidPtrArray& entitySet 
打碎后新生成的实体 

如果成功返回Mcad::eOk,如果传递的数据非法则返回Mcad::eInvalidInput

例如:打碎图块代码

    void ExplodeBlockReference()
    {
        ads_name entName;
        ads_point pt;
        if(acedEntSel(_T("打碎的块引用:"),entName,pt) != RTNORM)
        {
            return;
        }
        AcDbObjectId objId;
        if(acdbGetObjectId(objId,entName) != Acad::eOk)
            return;

        McDbObjectPointer<McDbBlockReference> spBlkRef(objId,AcDb::kForWrite);
        if(spBlkRef.openStatus() != Acad::eOk)
            return;

        McDbVoidPtrArray entitySet;
        if(spBlkRef->explode(entitySet) != Mcad::eOk)
            return;

        for(int i = 0; i < entitySet.length();i++)
        {
            McDbEntity* pEnt = (McDbEntity*)entitySet[i];
            MrxDbgUtils::addToCurrentSpaceAndClose(pEnt);
        }

        spBlkRef->erase();
    }
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!