.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: ThisDrawin g.Path equivalent
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-13-2011 10:49 PM in reply to:
aielli
dan.glassman => thx man!
Re: ThisDrawin g.Path equivalent
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-31-2011 03:35 PM in reply to:
aielli
<CommandMethod("Test1")>
Public Sub Test1()
Dim path As string = Autodesk.AutoCAD.ApplicationServices.Application.D
If Right(path,3) <> "dwg" then
MsgBox("This file has not been saved")
Else
MsgBox("ThisDrawing = " & path)
End If
Dim NewPath As String = Left(path, Len(path)-3) & "dat"
MsgBox(NewPath)
End Sub
Re: ThisDrawin g.Path equivalent
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-07-2012 09:59 PM in reply to:
aielli
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Public Shared ReadOnly Property ThisDrg() As AcadDocument
Get
Return Autodesk.AutoCAD.ApplicationServices.Application.D ocumentManager.MdiActiveDocument.AcadDocument
End Get
End Property
Public Shared Function GetPath(ByVal ThisDrg As AcadDocument) As String
Dim strPath As String = ThisDrg.FullName
strPath = IO.Path.GetDirectoryName(strPath)
Return strPath
End Function


