.NET

Reply
Contributor
13 Posts
0 Kudos
Registered: ‎03-07-2008
Post 1 of 6

missing an autocad reference

260 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*
9,819 Posts
1,213 Kudos
Registered: ‎06-29-2007
Post 2 of 6

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
13 Posts
0 Kudos
Registered: ‎03-07-2008
Post 3 of 6

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
13 Posts
0 Kudos
Registered: ‎03-07-2008
Post 4 of 6

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*
9,819 Posts
1,213 Kudos
Registered: ‎06-29-2007
Post 5 of 6

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
1 Posts
0 Kudos
Registered: ‎07-30-2014
Post 6 of 6

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
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!