I'm having problems setting a page setup current, the problem I'm having is the back ground in paper space does not update to the new paper size see code below. see attached bmp file.
Public Sub PageSetup_SetCurrent(ByVal PageSetupName As String)
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim Db As Database = acDoc.Database
Using acTrans As Transaction = Db.TransactionManager.StartTransaction()
Dim acLayoutMgr As LayoutManager = LayoutManager.Current
Dim acLayout As Layout = acTrans.GetObject(acLayoutMgr.GetLayoutId(acLayoutMgr.CurrentLayout), OpenMode.ForRead)
Dim acPlSet As DBDictionary = acTrans.GetObject(Db.PlotSettingsDictionaryId, OpenMode.ForRead)
If acPlSet.Contains(PageSetupName) = True Then
Dim plSet As PlotSettings = acPlSet.GetAt(PageSetupName).GetObject(OpenMode.ForRead)
acLayout.UpgradeOpen()
acLayout.CopyFrom(plSet)
acTrans.Commit()
Else
acTrans.Abort()
End If
End Using
'acDoc.Editor.Regen()
'DocumentManager.MdiActiveDocument.Editor.UpdateScreen()
'DocumentManager.MdiActiveDocument.SendStringToExecute("_Zoom A ", True, False, False)
End Sub