.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Update screen on layout change

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
304 Views, 0 Replies

Update screen on layout change

I use the following code to change the paper size in a layout (in paperspace)

{code}
LayoutManager layMgr = LayoutManager.Current;
Layout layout = tr.GetObject(layMgr.GetLayoutId(layMgr.CurrentLayout), OpenMode.ForWrite) as Layout;
PlotSettingsValidator plSetVal = PlotSettingsValidator.Current;
plSetVal.SetPlotConfigurationName(plSet, deviceName, canonicalMediaName);
plSetVal.SetPlotType(plSet, Autodesk.AutoCAD.DatabaseServices.PlotType.Extents);
plSetVal.SetStdScale(plSet, 1);
plSetVal.SetPlotCentered(plSet, true);
layout.CopyFrom(plSet);
{code}

It works, but the background with paper limits and print area are not at the good location (see picture attached). I tried with Editor.Regen, Editor.UpdateScreen, Database.updateExt, but no success.

To get the correct result, I've to use the PAGESETUP command.

It seems that the limits in paperspace are not updated correctly. Do you know how I can update my screen ?
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost