[每日一码] 使用ARX创建Layout
void createLayout(){
AcDbDatabase *curDocDB =acdbHostApplicationServices()->workingDatabase();
AcApLayoutManager *pLayM =(AcApLayoutManager*)acdbHostApplicationServices()->layoutManager();
ACHAR* nextLayoutName = pLayM->getNextNewLayoutName(NULL);
AcDbObjectId layoutId,btrId;
pLayM->createLayout(nextLayoutName, layoutId, btrId);
// 采用采用采用initialises AcDbLayout with appropriate defaults
pLayM->setDefaultPlotConfig(btrId);
// 采用采用采用采用setting as current layout
pLayM->setCurrentLayout(nextLayoutName);
pLayM->updateLayoutTabs();
}
页:
[1]