「Vla-get-author」の版間の差分
(ページの作成:「{{AutoLISP}} ; 構文 : (Vla-get-author ''vla-object'') ; 機能 : 作成者(Author)のプロパティを取得する。 ; 引数 :* vla-object … SummaryInfo ...」) |
細編集の要約なし |
||
71行目: | 71行目: | ||
* [[vlax-get-acad-object]] | * [[vlax-get-acad-object]] | ||
* [[vla-get-summaryinfo]] | * [[vla-get-summaryinfo]] | ||
* [[vla- | * [[vla-put-author]] | ||
* [[vla-get-database]] | * [[vla-get-database]] | ||
[[Category:AutoLISP]] | [[Category:AutoLISP]] |
2013年6月25日 (火) 08:10時点における最新版
- 構文
- (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) )
関連事項