missing an autocad reference

missing an autocad reference

Anonymous
Not applicable
1,470 Views
5 Replies
Message 1 of 6

missing an autocad reference

Anonymous
Not applicable

I am Programming with Visual Studio 2010.(VB.NET)

I am facing a problem that everytime I write "Dim Line1 as AcadLine" it shows error, whereas if I write "Dim Line1 As Autocad.Acadline" the code works fine.

Pls suggest which reference  am I missing ? (I would like to write "Dim Line1 as AcadLine".)

 

Deepak

0 Likes
1,471 Views
5 Replies
Replies (5)
Message 2 of 6

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

then place on top of your code-file this statement

Imports Autodesk.AutoCAD.Interop.Common

 

...plus do some readme in helps about Framework and Namespaces 😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 6

Anonymous
Not applicable

I am doing that already

 

I was missing the new keyword

 

Public Cadapp as New Acadapplication  Smiley Wink

 

0 Likes
Message 4 of 6

Anonymous
Not applicable

sorry the previuos reply was in some other context, I am still looking for the solution & will get back as soon as I find it

0 Likes
Message 5 of 6

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

then try this statement just to make sure you have all necessary references inluded:

Dim Line1 as Autodesk.AutoCAD.Interop.Common.AcadLine

 

Does that also result in an error? If so you are missing the reference to the COM-objects:

Autodesk.AutoCAD.Interop.Common.dll

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 6 of 6

Anonymous
Not applicable

Can you tell me what the 'Assembly' or COM is that I need to include in my VS2012 project?

 

I'm needing to open/save/close multiply dwg files programmatically, in order to update them to our latest version, as well as run a custom LISP routine upon each dwg to extract data from the drawing...

 

 

Thanks

Rick

0 Likes