.NET

Reply
Contributor
Posts: 13
Registered: ‎03-07-2008
Message 1 of 5 (177 Views)

missing an autocad reference

177 Views, 4 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: 8,592
Registered: ‎06-29-2007
Message 2 of 5 (167 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
Posts: 13
Registered: ‎03-07-2008
Message 3 of 5 (148 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
Posts: 13
Registered: ‎03-07-2008
Message 4 of 5 (145 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: 8,592
Registered: ‎06-29-2007
Message 5 of 5 (140 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
-------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community