Set fractional accuracy in part naming

When setting up a template, the default fractional accuracy is set to 1/16".  This can now be changed by accessing qtyFormatter.setFractionalAccuracy(##);  See script below for example to set it to 1/64". 

var height = part.getConfigQuantity('partH');

var width = part.getConfigQuantity('partW');

var length = part.getConfigQuantity('partL');

qtyFormatter.setUseFractionalInches(true);
qtyFormatter.setUsePunctuationUnits(true);
qtyFormatter.setIncludeUnits(true);

qtyFormatter.setFractionalAccuracy(64);

var description = qtyFormatter.format(width) + ' x ' + qtyFormatter.format(height) + ' x ' + qtyFormatter.format(length);

part.setDescription(description);

part.setName("Fraction Naming Test Part")


Comments