I don't remember where I found this, but maybe it'll help:
You can get the length of a part into the description as follows:
Start your custom properties editing in the part as usual with File, Properties. Then switch to the 'configuration specific' tab and select the 'description' property (or whichever you use in your BOM description field. In order to get values from annotations, type in the text portion, then double click your part (with the property dialogue still open) and click the text of the annotion you want. So, for example, you can type:
'ALUM. EXTRUSION, '
Then select from your profile sketch an overall dim showing the extrusion size. Next you type:
'MM SQ. X '
Now you can select the extrude length dim. Finally, finish it off with your desired text at the end, such as:
' MM LG.'
Remember to click Add or modify!
When you select the dims, Solidworks automatically puts code in the property which reads the value. You will see something like
'"D1@Sketch1@@Default@Part1.Sldprt"'
The entire File Properties will look something like:
ALUM. EXTRUSION, "D2@Sketch1@@Default@Part1.SLDPRT"MM SQ. X "D1@Base-Extrude@@Default@Part1.SLDPRT" MM LG.
When the BOM reads the property from the example above, it will show:
'ALUM. EXTRUSION, 40MM SQ. X 232 MM LG.