Vla-put-author

提供:GizmoLabs - だいたい CAD LISP なサイト
構文
(vla-put-author vla-object string)


機能
作成者(Author)のプロパティを設定する。


引数
  • vla-object … SummaryInfo のVLAオブジェクト
  • string … Authorの値
戻り値
Authorプロパティの文字列


サンプル
(vl-load-com)
(setq *ActDoc* (vla-get-ActiveDocument (vlax-get-Acad-Object)))

(defun c:ADD_PROPS (/ db si author nc nc2 nc3 value3 value4)
  (setq db (vla-get-Database *ActDoc*))
  (setq si (vla-get-SummaryInfo db))
  (vla-put-author si "gizmon")
  (vla-put-comments si "New comments")
  (vla-put-hyperlinkbase si "http://wiki.gz-labs.net")
  (vla-put-keywords si "New keywords")
  (vla-AddCustomInfo si "siPutKey" "siPutValue")
  (setq nc (vla-numcustominfo si))
  (vla-SetCustomByKey si "siPutKey" "siPutValueByKey")
  (vla-GetCustomByKey si "siPutKey" 'value3)
  (if (/= "siPutValueByKey" value3)
    (princ "*** Error SetCustomByKey\n")
  )
  (vla-SetCustomByIndex si (1- nc) "siPutCustomByIndexKey"
    "siPutCustomByIndexValue")
  (vla-GetCustomByKey si "siPutCustomByIndexKey" 'value4)
  (if (/= "siPutCustomByIndexValue" value4)
    (princ "*** Error SetCustomByIndex\n")
  )
  (vla-RemoveCustomByIndex si (1- nc))
  (setq nc2 (vla-numcustominfo si))
  (if (/= nc2 (1- nc))
    (princ "*** Error RemoveCustomByIndex")
  )
  (vla-AddCustomInfo si "siPutKey" "siPutValue")
  ; Remove property
  (vla-RemoveCustomByKey si "siPutKey")
  (setq nc3 (vla-numcustominfo si))
  (if (/= nc2 (1- nc))
    (princ "*** Error RemoveCustomByKey")
  )
  (vla-AddCustomInfo si "siPutKey" "siPutValue")
  (vlax-release-object si)
  (vlax-release-object db)
  (princ)
)
(princ)

関連事項