In principle, yes, by setting the Behaviour/ScaleTool attributes in the DC. But if you do set that up, why not use the native Scale tool? Or do you want to restrict the scaling to only one or two dimensions, which you can do in a DC.
Like this, for example:
diagonal JWM.skp (100.5 KB)
This shows only scale handles for up/down (Z or blue direction), left/right (X or red direction) or both together (in XZ/red and blue plane).
EDIT.
I wrote originally “Of course, that scales the thickness of the strut as well.”
But because of the clever way you have created the geometry the strut stays 1" square, even after scaling to width and height.
Things go a bit wrong if the width and height are too small (3" x 2" for example).
The diagonal and end triangles stay in the correct relationship until the width or height go below about 2.3 inches.
I tried to understand the detail of your calculations but found it slightly too difficult to be worth the full effort it would take.
I got as far as labelling a diagram with the names and values of your variables for a 30" x 20" diagonal.
diagonal JWM.skp (270.0 KB)
And I follow the maths thus far.
But I’m puzzled by the calculation of the LenX of the diagonalstraight
component as =Diagonal!LenZ-Diagonal!tri2hipc
tri2hipc is calculated as the hypotenuse of the small right triangle, but I think you should subtract the shorter side of that triangle, not the hypotenuse.
A very interesting exercise to follow your calculations, even if I haven’t quite understood it all.
PS. Changing the formulae to replace Diagonal!
by parent!
or Parent!
would allow you to rename the DC without breaking the formulae.
PPS. It would be an interesting exercise for you, and an even more useful DC to have, if you made the width and thickness of the strut into Component Options, and updated the calculations where necessary to replace the fixed 1" by either width or thickness as appropriate.