11/30/2022 0 Comments Acdb resource file autocad 2010MEs = pVpT->getAt(_T("*Active"),pActVp,AcDb::kForWrite) MEs = pDb->getViewportTable(pVpT,AcDb::kForRead) Here is an old code that performs a zoom extents into the active/current DWG:ĪcDbDatabase* pDb = acdbHostApplicationServices()->workingDatabase() One hope lies into the possibility AutoCAD does that everytime it opens a DWG so if you set the viewport parameters on your external DWG next time it opens should show the view at the coordinates you specified. If your external database is not opened and visible this call won't probably do anything. That said, even setting its parameters accordingly to your selection set extents (take a look at AcDbExtents class), you will need to call acedVportTableRecords2Vports() method which will force a regeneration of the active drawing. I never tried to manipulate the AcDbViewportTable on an external database but I believe you can set the "*Active" viewport settings programmatically without having this database active and current. The external database will be a new file thus will have its own ViewportTable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |