Vla-removecustombyindex
- 構文
- (vla-removecustombyindex vla-object Index)
- 機能
- インデックス値に対応するカスタム プロパティの名前(キー)と値を削除する。
- 引数
-
- vla-object … SummaryInfo の VLAオブジェクト
- Index … 削除するプロパティのインデックス値(長整数)。インデックスの範囲は、0~カスタム プロパティの数 -1 。
- 戻り値
- nil
- サンプル
(vl-load-com)
(defun c:Example_RemoveCustomByIndex()
;; 図面プロパティにアクセスするサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq summaryInfo (vla-get-SummaryInfo doc))
;; 標準プロパティを追加・表示
(vla-put-Author summaryInfo "太郎")
(vla-put-Comments summaryInfo "設計者")
(vla-put-HyperlinkBase summaryInfo "http://wiki.gz-labs.net")
(vla-put-Keywords summaryInfo "xxxビル 施工図")
(vla-put-LastSavedBy summaryInfo "JD")
(vla-put-RevisionNumber summaryInfo "12")
(vla-put-Subject summaryInfo "xxxビル 配置図")
(vla-put-Title summaryInfo "xxxビル")
(setq author (vla-get-Author summaryInfo))
(setq comments (vla-get-Comments summaryInfo))
(setq HLB (vla-get-HyperlinkBase summaryInfo))
(setq KW (vla-get-Keywords summaryInfo))
(setq LSB (vla-get-LastSavedBy summaryInfo))
(setq RN (vla-get-RevisionNumber summaryInfo))
(setq subject (vla-get-Subject summaryInfo))
(setq Title (vla-get-Title summaryInfo))
(alert (strcat "The standard drawing properties are "
"\n作成者 = " author
"\nコメント = " comments
"\nハイパーリンクベース = " HLB
"\nキーワード = " KW
"\n最終更新 = " LSB
"\nリビジョンナンバー = " RN
"\n表題 = " Subject
"\nタイトル = " Title
)
)
;; カスタムプロパティを追加・表示
(setq CustomPropertyBranch "Branch")
(setq PropertyBranchValue "Main")
(setq CustomPropertyZone "Zone")
(setq PropertyZoneValue "Industrial")
;; カスタムプロパティを追加
(if (>= (vla-NumCustomInfo summaryInfo) 1)
(vla-SetCustomByIndex summaryInfo 0 CustomPropertyBranch PropertyBranchValue)
(vla-AddCustomInfo summaryInfo CustomPropertyBranch PropertyBranchValue)
)
(if (>= (vla-NumCustomInfo summaryInfo) 2)
(vla-SetCustomByKey summaryInfo CustomPropertyBranch "Satellite")
(vla-AddCustomInfo summaryInfo CustomPropertyZone PropertyZoneValue)
)
;; カスタムプロパティを取得
(vla-GetCustomByIndex summaryInfo 0 'Key0 'Value0)
(setq Key1 CustomPropertyZone)
(vla-GetCustomByKey summaryInfo Key1 'Value1)
(alert (strcat "この図面のカスタムプロパティ "
"\n1番目のプロパティ名 = " Key0
"\n1番目のプロパティの値 = " Value0
"\n2番目のプロパティ名 = " Key1
"\n1番目のプロパティの値 = " Value1
)
)
;; カズタムプロパティをリムーブ
(vla-RemoveCustomByIndex summaryInfo 0)
(vla-RemoveCustomByKey summaryInfo Key1)
)
関連事項
- vlax-get-acad-object
- vla-get-activedocument
- vla-getcustombyindex
- vla-setcustombyindex
- vla-removecustombyindex
- vla-removecustombykey
- vla-addcustominfo
- vla-put-author
- vla-put-comments
- vla-put-hyperlinkbase
- vla-put-keyword
- vla-put-lastsavedby
- vla-put-revisionnumber
- vla-put-subject
- vla-put-title
- vla-get-author
- vla-get-comments
- vla-get-hyperlinkbase
- vla-get-keyword
- vla-get-lastsavedby
- vla-get-revisionnumber
- vla-get-subject
- vla-get-title