Congrats on your first post, and welcome to the forums!
I *think* you're looking for this, to apply the desired annotation scale:
(setvar 'cannoscale (strcat "1\" = <Desired_AnnoScale>'"))
Or, perhaps this may be of use:
(setvar 'cannoscale (strcat "1\" = " (rtos (getvar 'dimscale) 2 0) "'"))
Please note the space " " before and after the equal sign "="... this is present for my annotative scales list, yours may not include the spaces, and should be removed if that is the case. The text string should exactly match your format.
The vla-item function returns a vla-object in many cases from a collection, example:
Originally Posted by pBe
(setq layerItem (vla-item (vlax-get-layers *activeDoc*) "<LayerName>"))
The vlax-for function is used to do, check, of modify something for each vla-item in a vla-collection object, example:
(vlax-for lay (vla-get-layers *activeDoc*)
(vla-put-freeze lay :vlax-true))
Hope this helps!