Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I want to add file name (or maybe some other information) to my model space like somthing that command "field" does. here is code , it works except the most important thing! How can i access my file name (info variable)?
Sub fn()
Dim pt(0 To 2) As Double
Dim w As Double
Dim text As AcadMText
Dim ent As AcadEntity
Dim info As String
pt(0) = 10: pt(1) = 0: pt(2) = 0
Width = 10
info=?
Set text = ThisDrawing.ModelSpace.AddMText(pt, Width, info)
For Each ent In ThisDrawing.ModelSpace
If TypeOf ent Is AcadMText Then
Debug.Print ent.TextString
End If
Next
End Sub
Solved! Go to Solution.