LDraw.org Discussion Forums

Full Version: LPub: Part Lengths
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What discriminator does LPub use to determine the lengths of parts? Some parts such as Technic beams and axles will display a length in the Parts List. However, other parts such as Technic bricks and 1/2 width beams do not. Is there any way for me to edit the part files to enable this, or is it hard coded into LPub? I do a lot of Technic instructions and it is often quite difficult to tell from a PLI whether a 14L or 16L brick is used, for example.
Hi Eric,

I was just diving a bit into the code of LPUB for some other things and I found in the "pli.cpp" the following entries associated with the annotations:
titles << "^Technic Axle\\s+(\\d+)\\s*.*$";
titles << "^Technic Axle Flexible\\s+(\\d+)\\s*$";
titles << "^Technic Beam\\s+(\\d+)\\s*$";
titles << "^Electric Cable NXT\\s+([0-9].*)$";
titles << "^Electric Cable RCX\\s+([0-9].*)$";

My guess is that all parts starting with those strings will be highlighted with their respective length.


I can confirm this, as the current NXT cables are called "Electric mindstorms NXT..." and I renamed the parts to fit the LPUB convention and LPUB shows me now the length of the cables in the part lists.

To add now the technic bricks in the current version a line in the code unfortunately would be necessary. May be LPUB should read where to display further info from a settings file?

this hardcoded stuff could maybe better put into some INI file...
(2018-04-03, 17:36)Steffen Wrote: [ -> ]this hardcoded stuff could maybe better put into some INI file...

It is already, and it has been for about a year (or maybe two) now. At least for quite a while.
In LPub3D go to Configuration -> Edit parameter files -> Part Title PLI Annotations / Freeform PLI Annotations.