本文整理汇总了C++中AcDbDatabase::restoreOriginalXrefSymbols方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbDatabase::restoreOriginalXrefSymbols方法的具体用法?C++ AcDbDatabase::restoreOriginalXrefSymbols怎么用?C++ AcDbDatabase::restoreOriginalXrefSymbols使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbDatabase
的用法示例。
在下文中一共展示了AcDbDatabase::restoreOriginalXrefSymbols方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: docLock
void
ArxDbgUiTdcWblockClone::OnWblockBlkDef()
{
// get the block we're suppose to be wblocking
int index = m_puBlockDef.GetCurSel();
ASSERT(index != CB_ERR);
CString str;
AcDbObjectId blkDefId;
if (!m_blockList.GetAtIndex(index, str, blkDefId)) {
ASSERT(0);
return;
}
AcDbDatabase* sourceDb = getSourceDb();
ASSERT(sourceDb != NULL);
// lock the document we are wblocking from
ArxDbgDocLockWrite docLock(sourceDb);
if (docLock.lock() != Acad::eOk)
return;
// restore database to non-xref state (xes returns eOk if this
// was necessary, and something else if it wasn't).
Acad::ErrorStatus xes = sourceDb->restoreOriginalXrefSymbols();
AcDbDatabase* tmpDb = NULL;
Acad::ErrorStatus es = sourceDb->wblock(tmpDb, blkDefId);
if (xes ==Acad::eOk)
xes = sourceDb->restoreForwardingXrefSymbols();
if (es == Acad::eOk) {
doInsertOption(tmpDb);
delete tmpDb; // we're done with it
}
else {
CString str;
str.Format(_T("Wblock failed: %s"), ArxDbgUtils::rxErrorStr(es));
ArxDbgUtils::stopAlertBox(str);
delete tmpDb; // yes, a failed wblock can leave a partially created database!
// so always delete it.
}
}