本文整理汇总了C++中AcDbLayerTableRecord::isLocked方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbLayerTableRecord::isLocked方法的具体用法?C++ AcDbLayerTableRecord::isLocked怎么用?C++ AcDbLayerTableRecord::isLocked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbLayerTableRecord
的用法示例。
在下文中一共展示了AcDbLayerTableRecord::isLocked方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: acdbOpenAcDbObject
bool
ArxDbgUtils::isOnLockedLayer(AcDbEntity* ent, bool printMsg)
{
AcDbObject* obj;
AcDbLayerTableRecord* layer;
bool isLocked = false;
Acad::ErrorStatus es;
es = acdbOpenAcDbObject(obj, ent->layerId(), AcDb::kForRead);
if (es == Acad::eOk) {
layer = AcDbLayerTableRecord::cast(obj);
if (layer)
isLocked = layer->isLocked();
else {
ASSERT(0);
}
obj->close();
}
else {
ASSERT(0);
ArxDbgUtils::rxErrorMsg(es);
}
if (isLocked && printMsg) {
acutPrintf(_T("\nSelected entity is on a locked layer."));
}
return isLocked;
}
示例2:
CLayerState::CLayerState(const AcDbObjectId& idLayer)
{
m_idLayer = idLayer;
AcDbLayerTableRecord* pLayer = NULL;
if (acdbOpenObject(pLayer, m_idLayer, AcDb::kForRead) == Acad::eOk) {
m_bOff = pLayer->isOff();
m_bFrozen = pLayer->isFrozen();
m_bLocked = pLayer->isLocked();
pLayer->close();
} else {
m_bOff = false;
m_bFrozen = false;
m_bLocked = false;
}
}
示例3: acdbHostApplicationServices
void
AecUiPrEntitySet::getLockedLayers()
{
m_lockedLayerCache.setLogicalLength(0);
m_lockedLayerNames.RemoveAll();
if (m_filterLockedLayers == Adesk::kFalse)
return;
AcDbLayerTableRecord* layer;
const TCHAR* tmpName;
AcDbLayerTable* layTbl;
Acad::ErrorStatus es = acdbHostApplicationServices()->workingDatabase()->getSymbolTable(layTbl, AcDb::kForRead);
if (es == Acad::eOk) {
AcDbLayerTableIterator* tblIter;
if (layTbl->newIterator(tblIter) == Acad::eOk) {
for (; !tblIter->done(); tblIter->step()) {
es = tblIter->getRecord(layer, AcDb::kForRead);
if (es == Acad::eOk) {
if (layer->isLocked()) {
m_lockedLayerCache.append(layer->objectId());
es = layer->getName(tmpName);
if (es == Acad::eOk) {
m_lockedLayerNames.Add(tmpName);
}
else {
AEC_ASSERT(0);
m_lockedLayerNames.Add(_DNT(_T(""))); // have to keep balanced
}
}
layer->close();
}
}
delete tblIter;
}
else {
AEC_ASSERT(0);
}
layTbl->close();
}
}