ブロック、ドキュメント、アプリケーション、または外部参照のパスを取得します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.Path
タイプ: Application、Block、ComparedReference、Document、ExternalReference、PointCloud、PointCloudEx
このプロパティが適用されるオブジェクト。
読み込み専用: はい(ComparedReference、ExternalReference、Block オブジェクト以外)
タイプ: 文字列
アプリケーション、ドキュメント、または参照のパス。
追加の注意はありません。
VBA:
Sub Example_Path()
' This example returns the path of the drawing and application.
' If the drawing has not been saved, the path of the
' document will be blank.
Dim docPath As String
docPath = ThisDrawing.Path
MsgBox "The Path of the current drawing is " & docPath, , "Path Example"
Dim appPath As String
appPath = ThisDrawing.Application.Path
MsgBox "The Path of the current appication is " & appPath, , "Path Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_Path()
;; This example returns the path of the drawing and application.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; If the drawing has not been saved, the path of the
;; document will be blank.
(setq docPath (vla-get-Path doc))
(alert (strcat "The Path of the current drawing is " docPath))
(setq appPath (vla-get-Path acadObj))
(alert (strcat "The Path of the current appication is " appPath))
)