ドキュメント ウィンドウのタイトルを取得します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: はい
タイプ: 文字列
ドキュメントのウィンドウ タイトル。
追加の注意はありません。
VBA:
Sub Example_WindowTitle() ' This example cycles through the documents collection ' and uses the WindowTitle property to create a list of all open documents. Dim DOC As AcadDocument Dim msg As String ' If there are no open documents, then exit If Documents.count = 0 Then MsgBox "There are no open documents!" Exit Sub End If msg = vbCrLf ' Start with a space ' Cycle through all open drawings and get the window title of each drawing For Each DOC In Documents msg = msg & DOC.WindowTitle Next ' Display a list of open drawings MsgBox "The open drawing titles are: " & msg End Sub
Visual LISP:
(vl-load-com) (defun c:Example_WindowTitle() ;; This example cycles through the documents collection ;; and uses the WindowTitle property to create a list of all open documents. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; If there are no open documents, then exit (if (> (vla-get-Count (vla-get-Documents acadObj)) 0) (progn (setq msg "") ;; Cycle through all open drawings and get the window title of each drawing (vlax-for DOC (vla-get-Documents acadObj) (setq msg (strcat msg "\n" (vla-get-WindowTitle DOC))) ) ;; Display a list of open drawings (alert (strcat "The open drawing titles are: " msg)) ) (alert "There are no open documents!") ) )