当前位置: 首页>>代码示例>>C++>>正文


C++ AcDbLayerTableRecord::isLocked方法代码示例

本文整理汇总了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;
}
开发者ID:FengLuanShuangWu,项目名称:AutoCADPlugin-HeatSource,代码行数:29,代码来源:ArxDbgUtilsSymTbl.cpp

示例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;
	}
}
开发者ID:vuonganh1993,项目名称:arxlss,代码行数:15,代码来源:LayerState.cpp

示例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();
    }
}
开发者ID:FengLuanShuangWu,项目名称:AutoCADPlugin-HeatSource,代码行数:45,代码来源:ArxDbgUiPrEntitySet.cpp


注:本文中的AcDbLayerTableRecord::isLocked方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。