I would do it in Paragon.
I would create in the Category Dataset a new DATA. An expression type one.
The expression could be something like: ( 2 * INTHK + PARA[7 ] )
Where PARA7 is the actual bore or outside diameter.
If its Key is set, let's say, to TOTD then btex of GLAB could be: #PROPERTY^TOTD
That's a way to do it. But I have around 100 different pipspecs, and hundreds of datasets. I guess I have to modify all these datasets to solve these problems?
Yes. You are right.
Another solution could be implementing a UDA to work as a Pseudo-attribute that will do the calculation. But I have never tried this before. I could be wrong.
As you can read from Lexicon Command Reference Manual:
UPSEUD Setting this logical attribute to True will indicate the UDA is pseudo attribute. Pseudo attribute allow for dynamic values to be returned as needed rather than having static values stored in the database.
The code required to return a pseudo attribute value must be plugged in through the use of the C# API.