Beispiel #1
0
static void RemoveDictKey( const AcDbObjectId& dictId, const CString& key )
{
    AcDbDictionary* pDict = GetDictObject( dictId );
    if( pDict == 0 ) return;

    AcDbObjectId objId;
    pDict->remove( key, objId );
    ArxEntityHelper::EraseObject2( objId, true ); // 删除对象
    pDict->close();
}
Beispiel #2
0
bool ArxDictTool2::removeEntry( const CString& key )
{
    AcDbDictionary* pDict = GetDictObject( m_dictId );
    if( pDict == 0 ) return false;

    AcDbObjectId objId;
    bool ret = ( Acad::eOk == pDict->remove( key, objId ) );
    pDict->close();

    if( ret )
    {
        ArxEntityHelper::EraseObject2( objId, true );
    }
    return ret;
}