.NET

Reply
*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 11 of 15 (109 Views)

Re: Need help with code. I'm new to all this

08-26-2012 10:37 AM in reply to: phives

Hi,

>> ACAD2010
...and the message from the message above:
>> from assembly 'acdbmgd, Version=18.1.0.0

That shows me that you have referenced the managed dll from AutoCAD 2011, not the one for AutoCAD 2010, don't mix versions! So that is the first problem.

 

>> BTW. You know that I am doing this from a standalone EXE.

No, should I? Have you told that anywhere in your previous posts?

So Norman (in >>>this post<<<) is absolutely correct with his opinion and when you seek through www to get samples orientate more on VB6 or VBA for AutoCAD (and not dotNET-based application development).

To get the most direct help then is to download the VBA-enabler (from >>>here<<<), if you start then VBAIDE you have the help that shows you how to use COM-based development with AutoCAD.

 

Good luck, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
phives
Posts: 22
Registered: ‎08-25-2012
Message 12 of 15 (106 Views)

Re: Need help with code. I'm new to all this

08-26-2012 11:15 AM in reply to: Alfred.NESWADBA

I'm using VisualBasic not VBA.

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 13 of 15 (103 Views)

Re: Need help with code. I'm new to all this

08-26-2012 11:20 AM in reply to: phives

Hi,

 

>> I'm using VisualBasic not VBA.

but the help is the best and the syntax is about the same.

I just wanted to point you to the most easy way to see a lot of sample-code as the VBA-for-AutoCAD shows for nearly every entity-type/every function/property/sub a sample. And as long as you have not installed the VBA-Enabler you won't have access to the help-file (acadauto.chm).

 

- alfred -

 

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
phives
Posts: 22
Registered: ‎08-25-2012
Message 14 of 15 (98 Views)

Re: Need help with code. I'm new to all this

08-26-2012 11:32 AM in reply to: Alfred.NESWADBA

I downloaded the enabler. Have no idea where it installed to. Can't find it on my  machine.

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 15 of 15 (96 Views)

Re: Need help with code. I'm new to all this

08-26-2012 11:37 AM in reply to: phives

Hi,

 

>> I downloaded the enabler. Have no idea where it installed to

Just downloaded or also the exe started?

If you have started the exe so the VBA-Enabler got installed you can start AutoCAD, start command _VBAIDE and you are in the VBA-environment for AutoCAD.

Alternativly you may search for the file acadauto.chm ==> you can start it and use it for search and for samples for how to access blockreferences, attributereferences, open drawings and so on.

 

Good luck, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!