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


         

will be in the map


// will be in the map for translation.

//

pObjClone = NULL;

pObj->deepClone(pDestDict, pObjClone, idMap);

// INSERT usually uses a method of cloning

// called CheapClone, where it "moves" objects

// into the destination database instead of

// actually cloning them. When this happens,

// pObj and pObjClone are pointers to the

// same object. We only want to close pObj

// here if it really is a different object.

//

if (pObj != pObjClone)

pObj->close();

if (pObjClone == NULL)

continue;

// If the name already exists in our

// destination dictionary, it must be changed

// to something unique. In this example, the

// name is changed to an anonymous entry.

// The setAt() method will automatically append

// a unique identifier to each name beginning

// with "*", for example: "*S04".

//

if ( pDestDict->getAt(pName, dictId) == Acad::eKeyNotFound)

pDestDict->setAt(pName, pObjClone, dictId);

else

pDestDict->setAt("*S", pObjClone, dictId);

pObjClone->close();

}

delete pIter;

pDestDict->close();

break;

default:

break;

}

pSrcDict->close();

}


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