.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VBA to VB.net

3 REPLIES 3
Reply
Message 1 of 4
muthineni
463 Views, 3 Replies

VBA to VB.net

I have created a macro using VBA which is working fine and after that i have written the same logic in VB.net and that DLL is giving lot of errors. Is there any way that i can use the vba code as it is in VB.net? Thank you.
3 REPLIES 3
Message 2 of 4
Jeff_M
in reply to: muthineni

"As it is"? No. There are many differences between VBA & VB.NET. THey ARE similar, and you may be able to get your code to work with minimal effort. But you may get more help if you post the code you are trying to get to work, as well as posting what the errors are you are getting.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 4

Useful link: http://through-the-interface.typepad.com/through_the_interface/2010/05/more-translated-autocad-vba-t...

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 4 of 4
beeb.pm.Net
in reply to: muthineni

To start with, get the thisdrawing equivalent using .net

Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common

Private Shared ReadOnly Property ThisDrg() As AcadDocument
        Get
        Return Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.AcadDocument
        End Get
    End Property

 Most of the VBA codes can be accessed though ThisDrg property

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost