Posted 17 June 2024, 7:32 am EST
Hi!
I’m using :Net Framework 4.8 Controls.
After upgrading from version 2023v3(631) to 2024v1(657) next line code doesn’t work anymore:
double yMM;
yMM = printDoc.PageLayout.PageSettings.TopMargin + 17;
It throws this error:
Exception: $exception {“Unsupported unit of measurement: [Default].”} System.Exception
Stack trace
at C1.C1Preview.Utils.ConvertUnits(Double value, UnitTypeEnum from, UnitTypeEnum to, Single fromDpi, Single toDpi)
at C1.C1Preview.Unit.ConvertUnit(UnitTypeEnum destUnitType)
at C1.C1Preview.Unit.op_Addition(Unit u1, Unit u2)
I found a workaround which does the same and does not throw error:
double yMM;
yMM = printDoc.PageLayout.PageSettings.TopMargin;
Ymm += 17;
Can You please check what gone wrong between versions 2023v3(631) and 2024v1(657).
Thank You.
Regards,
Hrvoje