I created a block of my scale bar with attributes for the values. The tags of the attributes are 0.5, 1.0, 2.0 etc, corresponding to the values displayed on the final, scaled bar. Then my code cycles through the attributes, multiplying the tag value by the scale factor.
This code is used to populate the attributes in the block reference.
(defun dkb_insScaleBlock(pBLockName pCurrSpaceObj pInsPoint pInsertScale pScaleFactor / COUNT
OATTRIB OSCALEBAR SAATTRIB SAMAX VATTRIB)
(setq oScaleBar (vla-insertblock pCurrSpaceObj pInsPoint pBlockname pInsertScale pInsertScale pInsertScale 0.0 )
vAttrib (vla-getattributes oScaleBar)
saAttrib (vlax-variant-value vAttrib)
saMax (+ 1 (vlax-safearray-get-u-bound saAttrib 1))
Count 0
)
;; **** cycle thru the attributes and multiply the tag-string by the desired scale factor *****
(repeat saMax
(setq oAttrib (vlax-safearray-get-element saAttrib Count))
(vla-put-textstring oAttrib (rtos (* pScaleFactor (atof (vla-get-tagstring oAttrib))) 2 0))
(vlax-release-object oAttrib)
(setq Count (+ 1 Count))
);end repeat
(vlax-release-object oScaleBar)
);defun css_insScaleBlock
It doesn't use Diesel, but maybe it will give you some ideas