//get the active layoutAcDbLayout*pLayout=pLayMan->findLayoutNamed(pLayMan->findActiveLayout(TRUE),TRUE);//获得当前布局AcDbObjectIdm_layoutId=pLayout->objectId();//获得布局的IdAcPlPlotInfoplotInfo;AcDbPlotSettingsValidator*pPSV=acdbHostApplicationServices()->plotSettingsValidator();plotInfo.setLayout(pLayout->objectId());//必须设置AcDbPlotSettings*m_pSetting=newAcDbPlotSettings(pLayout->modelType());m_pSetting->copyFrom(pLayout);pPSV->refreshLists(m_pSetting);m_pSetting->setShadePlot(AcDbPlotSettings::kAsDisplayed);m_pSetting->setShadePlotResLevel(AcDbPlotSettings::kNormal);m_pSetting->setScaleLineweights(false);m_pSetting->setPrintLineweights(true);m_pSetting->setPlotTransparency(false);m_pSetting->setPlotPlotStyles(true);m_pSetting->setDrawViewportsFirst(true);