Printing Margins not working

Printing Margins not working

graham
Participant Participant
195 Views
1 Reply
Message 1 of 2

Printing Margins not working

graham
Participant
Participant

Hi

Just a quick observation of a possible small bug?  I've just updated a 2021 Addin to 2023.  The Printer Parameter properties UserDefinedMarginX and UserDefinedMarginY were replaced with OriginOffsetX and OriginOffsetY in 2022.  I have found that the new properties have no affect on the margins, ie, they appear to stay at zero.  Even though the old properties were depreciated in 2022 they still work in 2023 so my old code still works thankfully.

 

// Obsolete as of 2022 but still works in 2023.  Good job it still works
// because its replacement has no affect!
// pm is a PrintManager object (doc.PrintManager)
// 0.2 inches = 5mm approx
pm.PrintSetup.CurrentPrintSetting.PrintParameters.UserDefinedMarginX = 0.2;
pm.PrintSetup.CurrentPrintSetting.PrintParameters.UserDefinedMarginY = 0.1;

// New properties OriginOffsetX and OriginOffsetY has no affect on the margin
// OriginOffsetX/Y is in feet
pm.PrintSetup.CurrentPrintSetting.PrintParameters.OriginOffsetX = 5 / App.MM_IN_FEET;
pm.PrintSetup.CurrentPrintSetting.PrintParameters.OriginOffsetY = 2.5 / App.MM_IN_FEET;

 

0 Likes
196 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

Thank you for the question. I asked the devteam for you.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes