I'm confused, why not save time and energy by making a scale block with visibility states? This seems quite slower than inserting a block and changing state. Your insert command also seems weird
(command "mscale" "test" "_S" 1.0 "_R" 0.0 "_non" dt1
)
will bring it in at a scale factor 1, rotation 0 degrees and point dt1. D1 through D6 do not belong in the insert line.
What is the actual intent of D1 through D6?