Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone
This is my first post here.
I have a bunch of code working just fine in VBA, Im trying to migrate this over to VB.NET.
I keep getting FATAL ERRORS on
MsgBox(ThisDrawing.Path)
WHY??????
I have looked in the online help in "AutoCAD .NET Developer's Guide 2015".
I saw the line on "VBA to VB.NET and C# Comparison (.NET)" that mentions Thisdrawing but it still doesnt help.
I have also searched the .NET section of this forum (Yes I actually use the Search function)
Below is my code.
Please help me.
Option Explicit On '************Imports****************** Imports Autodesk.AutoCAD.Runtime Imports Autodesk.AutoCAD.DatabaseServices Imports Autodesk.AutoCAD.Geometry '************************************* Imports Autodesk.AutoCAD.ApplicationServices 'Imports Autodesk.AutoCAD.Interop '************************************* Imports Autodesk.AutoCAD.ApplicationServices.Application Imports Autodesk.AutoCAD.ApplicationServices.DocumentExtension Namespace myTest Public Class myTest Public ThisDrawing As AutoCAD.AcadDocument <CommandMethod("myTest")> Sub myTest() MsgBox(ThisDrawing.ActiveDocument.Path) End Sub End Class End Namespace
Solved! Go to Solution.