本文整理汇总了C++中AcDbDatabase::layerTableId方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbDatabase::layerTableId方法的具体用法?C++ AcDbDatabase::layerTableId怎么用?C++ AcDbDatabase::layerTableId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbDatabase
的用法示例。
在下文中一共展示了AcDbDatabase::layerTableId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ads_MyDialog
int ads_MyDialog()
{
// sample from brxtemplate
//++-- See StdAfx for these types
StringPairs LayerList;
AcDbDatabase *pDb = acdbHostApplicationServices()->workingDatabase();
pDb->layerTableId();
LayerTablePointer pLayerTable(pDb->layerTableId(),AcDb::kForRead);
if(pLayerTable.openStatus() != eOk)
{
ads_retnil();
return( RSRSLT);
}
AcDbLayerTableIterator *pLayerTableIterator;
pLayerTable->newIterator(pLayerTableIterator);
//++-- iterate though and get our stuff
for (pLayerTableIterator->start();
!pLayerTableIterator->done();
pLayerTableIterator->step())
{
AcDbObjectId LayerId;
TCHAR *LayerName;
CString LayerColor;
pLayerTableIterator->getRecordId(LayerId);
LayerTableRecordPointer pLayerTableRecord(LayerId,AcDb::kForRead);
pLayerTableRecord->getName(LayerName);
AcCmColor clr = pLayerTableRecord->color();
LayerColor = clr.bookName();
LayerColor.Format(_T("Red = %03d Green = %03d Blue = %03d "),
clr.red(), clr.green() , clr.blue());
LayerList.push_back(StringPair(String(LayerName), String(LayerColor)));
}
delete pLayerTableIterator;
{
// you should always call this before your diaog;
CAcModuleResourceOverride resOverride;
//show our dialog
MyDialog dlg(LayerList,CWnd::FromHandle(adsw_acadMainWnd()));
dlg.DoModal();
}
ads_retnil();
return( RSRSLT);
}