Ejemplo n.º 1
1
void ArxEntityHelper::DrawEntities( const AcDbObjectIdArray& objIds, AcGiWorldDraw* mode )
{
    AcTransaction* pTrans = actrTransactionManager->startTransaction();
    if( pTrans == 0 ) return;

    int len = objIds.length();
    for( int i = 0; i < len; i++ )
    {
        AcDbObject* pObj;
        if( Acad::eOk != pTrans->getObject( pObj, objIds[i], AcDb::kForRead ) ) continue;

        AcDbEntity* pEnt = AcDbEntity::cast( pObj );
        if( pEnt == 0 ) continue;

        //acutPrintf(_T("\n绘制第%d个图元"), i);
        pEnt->worldDraw( mode );
    }

    actrTransactionManager->endTransaction();
}
Ejemplo n.º 2
-1
static void DrawBlockEnts( AcGiWorldDraw* mode, AcGeVoidPointerArray& ents )
{
    int n = ents.length();
    for( int i = 0; i < n; i++ )
    {
        AcDbEntity* pEnt = ( AcDbEntity* )ents[i];
        pEnt->worldDraw( mode );
    }
}