.NET

Reply
Contributor
deepakpuri
Posts: 13
Registered: ‎03-07-2008
Message 1 of 6 (248 Views)

missing an autocad reference

248 Views, 5 Replies
07-18-2012 03:46 AM

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,217
Registered: ‎06-29-2007
Message 2 of 6 (238 Views)

Re: missing an autocad reference

07-18-2012 06:31 AM in reply to: deepakpuri

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 :smileywink:

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
deepakpuri
Posts: 13
Registered: ‎03-07-2008
Message 3 of 6 (219 Views)

Re: missing an autocad reference

07-19-2012 02:06 AM in reply to: Alfred.NESWADBA

I am doing that already

 

I was missing the new keyword

 

Public Cadapp as New Acadapplication  :smileywink:

 

Contributor
deepakpuri
Posts: 13
Registered: ‎03-07-2008
Message 4 of 6 (216 Views)

Re: missing an autocad reference

07-19-2012 02:13 AM 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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,217
Registered: ‎06-29-2007
Message 5 of 6 (211 Views)

Re: missing an autocad reference

07-19-2012 02:53 AM in reply to: deepakpuri

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
-------------------------------------------------------------------------
New Member
rcloud85
Posts: 1
Registered: ‎07-30-2014
Message 6 of 6 (58 Views)

Re: missing an autocad reference

07-30-2014 11:19 AM 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.