The wire length value displayed on lists and reports does come from the resource wire routing at the mechanical layout. It’s info, by standard is given in millimeters – with two decimal places precision.
In the To-From wire list, that displays each wire segment connections with our project’s components, it’s possible to export the wire length value as, for example: 1205,63 mm. (mind the 0,63 mm precision)
If you don’t know the To-From wire list, you can learn more about what is it and how to generate one by clicking here.
The wire length precision of two decimal places is sometimes not necessary. As we all know, due to practical assembly and mechanical limitations, it may be more practical just to work with functional dimensions. This new value would be a reference number, more practical to output, without losing on quality and functionality.
By this method, the length of the example above would be exported as: 1205 mm.
We use the VARIABLE property to inform the wire length value in lists. By filling this property in the detail block with LENGTH.
To display only integers, we can change this property from VARIABLE to FUNCTION. By filling this function with the value:
(itoa (atoi (dxf “LENGTH” reg)))
1. Open the detail block used in the list template;
2. Find the VARIABLE property;
3. Change the name of the VARIABLE property to FUNCTION;
4. Change the value of the FUNCTION property from LENGTH to (itoa (atoi (dxf “LENGTH” reg)));
5. Save the changes.