.NET

Reply
*Expert Elite*
Alfred.NESWADBA
Posts: 8,916
Registered: ‎06-29-2007
Message 11 of 15 (101 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 (98 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: 8,916
Registered: ‎06-29-2007
Message 13 of 15 (95 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 (90 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: 8,916
Registered: ‎06-29-2007
Message 15 of 15 (88 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
-------------------------------------------------------------------------

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 familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

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

Ask the Community