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

         

Iterate over the entities in


// 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);

}


Содержание  Назад  Вперед







Forekc.ru
Рефераты, дипломы, курсовые, выпускные и квалификационные работы, диссертации, учебники, учебные пособия, лекции, методические пособия и рекомендации, программы и курсы обучения, публикации из профильных изданий