Reset Page Scaling Factor to 100 percent

From Vectorlab
Jump to: navigation, search


A simple script to reset the page scaling factor of the current sheet layer or of all of them. By Orso B. Schmid

{ Orso *********************************************** }
{ reset printer page scaling to 100% }
PROCEDURE ResetPrinterScaling;
VAR
	lay : HANDLE;

	FUNCTION resetPage(H: HANDLE): BOOLEAN;
		BEGIN
			IF GetObjectVariableInt(H, 154) = 2 THEN { is sheet layer }
				setPrefReal(70, 1);
		END;
BEGIN
	IF YNDialog('Apply to all layers or only current?') THEN
		ForEachObjectInList(resetPage, 0, 2, FLayer)
	ELSE
		setPrefReal(70, 1);

	AlrtDialog('Done');	
END;
Run(ResetPrinterScaling);