Gets the text that the user sees displayed for the application or a menu item.
Supported platforms: Windows only
VBA:
object.Caption
Type: Application, PopupMenuItem
The objects this property applies to.
Read-only: No (except for PopupMenuItem objects)
Type: String
Title displayed in the AutoCAD application window or for a menu item on a popup menu.
For a menu item, this property is read-only and is derived from the Label property by removing any DIESEL string expressions.
VBA:
Sub Example_Caption() ' This example returns the caption for the current ' AutoCAD session. ' Get the Caption property Dim strCaption As String strCaption = ThisDrawing.Application.Caption MsgBox "The caption for this session is " & ThisDrawing.Application.Caption, , "Caption Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_Caption() ;; This example returns the caption for the current ;; AutoCAD session. (setq acadObj (vlax-get-acad-object)) ;; Get the Caption property (setq strCaption (vla-get-Caption acadObj)) (alert (strcat "The caption for this session is " strCaption)) )