Auto-scale drawing based on property

Hello all,

I was wondering if you guys see any possibility of creating a macro which reads a part/assembly property (for example, the length of an axle) and automatically adjusts the drawing scale to fit the part on the drawing paper. Ideally, it would also automatically read the drawing paper dimensions, so that it would work with any size of papers (A4,A3,A2, etc.).

I found this macro, but can't really find a way to adapt it to my wishes..

Can you guys help me out?

Thanks in advance,

Best regards,

Arno D

SolidworksApi macros