I have created .net vba to open the autoCAD file. Now I want to create line in autoCAD using userform or windowsform in CAD. Can anyone help me?

I have created .net vba to open the autoCAD file. Now I want to create line in autoCAD using userform or windowsform in CAD. Can anyone help me?

niwesh.tamrakar
Observer Observer
478 Views
4 Replies
Message 1 of 5

I have created .net vba to open the autoCAD file. Now I want to create line in autoCAD using userform or windowsform in CAD. Can anyone help me?

niwesh.tamrakar
Observer
Observer

I have created .net vba to open the autoCAD file. Now I want to create line in autoCAD using userform or windowsform in CAD. Can anyone help me?

0 Likes
479 Views
4 Replies
Replies (4)
Message 2 of 5

norman.yuan
Mentor
Mentor

You may want to be describe what you have done correctly: with what you have said, it cannot be both .NET and VBA. Unless you clearly indicate what kind of project you are doing, it would be difficult to answer your question.

 

VBA is an environment of development built into AutoCAD and run inside AutoCAD and uses AutoCAD COM API. It has nothing to do with .NET or AutoCAD .NET API.

 

If you are using Visual Studio, you could do 2 different things against AutoCAD: you can create an EXE application (console, or win form or WPF) and use AutoCAD COM API to control AutoCAD (with either C# or VB.NET, which does not matter here); Or you can create DLL project as AutoCAD plugin with AutoCAD .NET API (again, C# or VB.NET, does not matter). With these 2 different types project, the answer to your not so clearly asked question could be quite different.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

niwesh.tamrakar
Observer
Observer

I have written a .dll program to draw drawings in AutoCad which can be loaded with Netload. But I want to make an application to do the same and I dont want to netload it. Rather I want an .exe to load a form and draw drawings in autocad. Also I want that program to detect if the autocad is loaded or not. If loaded then draw on that activated drawing. Can you help me?

0 Likes
Message 4 of 5

_gile
Consultant
Consultant

Hi,

 

You should read this topic from the documentation.

After you get or create an instance of AutoCAD, you can either call NETLOAD and a command from your DLL (as shown in the documentation example) or directly draw in AutoCAD using the COM/ActiveX API.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 5 of 5

niwesh.tamrakar
Observer
Observer

Ok. Thank You.

0 Likes