ObjectARX, AutoCAD. Среда программирования библиотеки C++


AcDbDatabase:: wblockCloneObjects () Функция - часть 3


// Get a work set iterator

//

AcDbLongTransWorkSetIterator* pWorkSetIter =

pLongTrans->newWorkSetIterator();

// Iterate over the entities in the work set

// and change the color.

for (pWorkSetIter->start(); !pWorkSetIter->done(); pWorkSetIter->step()) {

AcDbEntity *pEntity;

acdbOpenAcDbEntity(pEntity, pWorkSetIter->objectId(),

AcDb::kForWrite);

pEntity->setColorIndex(colorIndex);

pEntity->close();

}

delete pWorkSetIter;

}

pObj->close();

}

// Pause just to see the change.

//

char str[132];

acedGetString(0, "\nNote the new colors. Press return to \

check the objects back in to the original database", str);

// Check the entities back in to the orginal database.

//

acapLongTransactionManagerPtr()->checkIn(transId);

// Save the original database, since we made changes

//

pDb->saveAs(fname);

// Close and Delete the database.

//

delete pDb;

pDb = NULL;

acad_free(fname);

}

 




Начало  Назад  Вперед



Книжный магазин