Setting Papersize V7

I'm having a bit of a strugle here:After adding a Layout tab to a drawing I want to set its paper to A3, Landscape, size in Mm, scale 1:1.The code below was meant to do it but the .RefreshPlotDeviceInfo method gives me an error. When checking the Pagesetup for the new Tab, the settings are there, but I have t manually click the Apply button to make the changes visible.Anybody can give me a clue in the right direction?T.I.A.Arno van EeuwenCall IcadSetMedia(objLayout, "A3", 1, 1, 1, 1)Public Function IcadSetMedia(oLayout As IntelliCAD.Layout, strSize As String, _ iRotation As Integer, iPaperUnits As Integer, _ dNum As Double, dDen As Double) As Long If iRotation = 0 Then oLayout.PlotRotation = vic0degrees If iRotation = 1 Then oLayout.PlotRotation = vic90degrees oLayout.CanonicalMediaName = strSize oLayout.PaperUnits = iPaperUnits Call oLayout.SetCustomScale(dNum, dDen) IntelliCAD.ActiveDocument.ActiveLayout = oLayout oLayout.RefreshPlotDeviceInfo End Function