admin 发表于 2024-3-14 20:22:44

[每日一码] 使用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]
查看完整版本: [每日一码] 使用ARX创建Layout