Vla-get-author

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


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


引数
  • vla-object … SummaryInfo のVLAオブジェクト


戻り値
Authorプロパティの文字列


サンプル
(vl-load-com)
(defun c:GET_PROPS (/ doc db si author )
  (if (/= "MyDrawing.dwg" (getvar "DWGNAME"))
    (princ "Open MyDrawing.dwg")
    (progn
      (setq *ActDoc* (vla-get-ActiveDocument (vlax-get-Acad-Object)))
      (setq db (vla-get-Database *ActDoc*))
      (setq si (vla-get-SummaryInfo db))
      (princ "\n作成者(Author): \n")
      (if (/= "John" (setq author (vla-get-author si)))
        (princ "*** vla-get-author error")
        (princ author)
    )
    (princ "\n")
    (princ "\nコメント(Comments):\n ")
    (princ (vla-get-comments si))
    (princ "\n")
    (princ "\nリンク(Hyperlink-base): \n")
    (princ (vla-get-HyperlinkBase si))
    (princ "\n")       
    (princ "\nカスタムプロパティ数(Number of custom properties): ")
    (princ (setq nc (vla-numcustominfo si)))
    (princ "\n")       
    (while (> nc 0) 
      (princ "カスタムプロパティ(Custom property) ")
      (princ nc)
      (vla-GetCustomByIndex si (- nc 1) 'key 'value)
      (princ ": key(")
      (princ key)
      (princ ")")
      (princ " 値(value)(")
      (princ value)
      (princ ")\n")
      (vla-GetCustomByKey si key 'value2)
      (if (/= value value2)
        (princ "\n*** Error GetCustomByKey returned unexpected
         result.\n")
      )
      (setq nc (1- nc))
    )
    (vlax-release-object si)
    (vlax-release-object db)
    (vlax-release-object *ActDoc*)
    )
  )
  (princ)
)

関連事項