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

missing an autocad reference

5 REPLIES 5
Reply
Message 1 of 6
deepakpuri
687 Views, 5 Replies

missing an autocad reference

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

5 REPLIES 5
Message 2 of 6

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
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 6

I am doing that already

 

I was missing the new keyword

 

Public Cadapp as New Acadapplication  Smiley Wink

 

Message 4 of 6
deepakpuri
in reply to: deepakpuri

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

Message 5 of 6

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
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 6
rcloud85
in reply to: Alfred.NESWADBA

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

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