Vla-update
- 構文
- (vla-update vla-object)
- 機能
- 図面内のオブジェクトを更新する。
- 引数
-
- vla-object … 更新するVLA オブジェクト
- 戻り値
- nil
- サンプル
;;; 属性幅の変更
;;; ex.
;;; (setq *actdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
;;; (gz:ChangeTagWidth *actdoc* "panel1" "drw-no" 0.97)
(defun gz:ChangeTagWidth (doc bn tagname tagwidth / layout i atts tag)
;;; (gz:ChangeTagWidth <doc> <block name> <tag name> <tag height>)
(vlax-for layout (vla-get-layouts doc)
(vlax-for i (vla-get-block layout)
(if (and
(= (vla-get-objectname i) "AcDbBlockReference")
(= (strcase (vla-get-name i)) (strcase bn))
)
(if (and
(= (vla-get-hasattributes i) :vlax-true)
(safearray-value
(setq atts
(vlax-variant-value
(vla-getattributes i))))
)
(foreach tag (vlax-safearray->list atts)
(if (= (strcase tagname) (strcase (vla-get-tagstring tag)))
(vla-put-scalefactor tag tagwidth)
))
(vla-update i)
)))))
関連事項