VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Visual Basic Customisation

7 REPLIES 7
Reply
Message 1 of 8
sreejith.ponnath
687 Views, 7 Replies

Visual Basic Customisation

Dear All,

 

I am not basically an Autocad professional. However, I have worked on a project where in we lined the Autocad Map with our SQL Database with some VB customisation. This was more than 5 years back. We had used ACADX.arx active-x that time for our coding.

 

We have a new requirement now to link our Oracle database with Autocad. Could someone please advise  me if there is an updated version of the active-x that is compatible with the latest versions of autocad ? If not, is there any alternative solution that we can use ?

 

Thanks and best regards,

 

7 REPLIES 7
Message 2 of 8

There has been quite some changes in term of AutoCAD (and its vertical products) programming: .NET API has now become primary customization direction since Acad2005 (but Acad2006 is the version .NET API customization became practical).

 

While you can still connect AutoCAD to various data source via COM/ActiveX API (ADO/DAO), with VBA is apporaching its end of life quickly, you may wna to explore .NET API from now on.

 

Sine you mentioned Acad MAP, the database you actually want to connect to may be a SPATIAL/GIS database, not a generic database. In this case, it is not that simple to connect to it from any AutoCAD product. AutoCAD MAp/Civil 3D has built-in mechanism to connect to Spatial database (via FDO), while with vanilla AutoCAD you need to set up FDO (open source product) and write more code than you do with Acad Map to get connected.

 

Without more details, it is difficult to comment further.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 8

Spoiler
Spoiler
 

Hello Norman,

 

Sorry for my late response.

 

We had used the acadx.arx to display the tooltip when the person scrolled the mouse over the locations in the autocad drawings. Even though i mentioned map, it used to work on normal cad drawings also.

 

I have a similar requirement now. We need to display graphically (with colours) on the autocad drawing, various information related to our locations. eg .. The assets maintenance details, some structural information, some information on tenants etc.

 

What I had done earlier is, i had captured the coordinates of a location in a database table. So if the user takes the mouse onto that location, the information related , wil be displayed in a tooltip.

 

I have the logic ready for this. However, I am not sure of the active-x that needs to be used with the new versions of autocad.

 

Sorry for this, but as I mentioned, I am an Oracle apps/ Java/VB professional and my knowledge on Autocad products is very much limited.

 

Kindly request your assistance.

 

Regards

Message 4 of 8

OK, let's limit the topic on what you want to do: moving mouse over an AutoCAD entity in drawing and showing custom information (froom a database) in tooltip.

 

There is no COM/AtiveX API that can do that. So, you are out of luck, if you are to do it iin AutoCAD VBA, or VB6, or .NET with COM API.

 

It can be done with ObjectARX in C++ and with ObjectARX .NET API (since Acad2006). I have a code sample of Acad .NET API that shows how to display a custom tooltips with custom information in this discussion (Acad map developer forum)

 

http://forums.autodesk.com/t5/AutoCAD-Map-3D-Developer/PointMonitor-on-Feature-Objects/m-p/3047948#M...

 

In that sample code, you only need to change code in GetToolTip() method to obtain your tooltip information from your database.

 

I suspect that showing tool tip is just part of your AutoCAD customization, and it might be more. As a developer, we all know it too well that when it gets started, snowball is rolling and getting big quickly. So, you might want to invest some time to learn AutoCAD .NET API. If you are dealing Acad Map and GIS/Spatial data, you may want to also look into Acad MAP .NET API.

 

BTW, this forum traditionally focuses on Acad VBA customization (when in is pre-web UI era, it was called VBA customization) with COM API. For better chance to get more helpful responses, you might s well go to .NET forum.

 

HTH

Norman Yuan

Drive CAD With Code

EESignature

Message 5 of 8
pgsoman
in reply to: sreejith.ponnath

Hello!,

I am writting a VB 6.0 program for remote access to AutoCad. I am able to open AutoCad application & the open a new blank drawing using VB 6.0 code.

I have already written an AutoLisp program for drawing generation using given inputs.

I want to know the VB 6.0 code to start this AutoLisp program in the newly opened drawing as stated above.

 

Regards,

Prakash Soman

Message 6 of 8
Alfred.NESWADBA
in reply to: pgsoman

Hi

 

@pgsoman ==> it does not make any sense to >>>duplicate/crosspost<<< your questions into threads that have nothing to do with your question!

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 8
pgsoman
in reply to: sreejith.ponnath

Sorry Sir,

 

How to enter in a discussion forum is not clear to me & hence the disturbance in your forum. I will look for the right way of putting forth the question at appropriate place.

 

Regards,

Prakash 

Message 8 of 8
Alfred.NESWADBA
in reply to: pgsoman

Hi,

 

>> How to enter in a discussion forum is not clear to me [...]

look to >>>these FAQs<<< for things that are not clear using these forums.

 

Good luck, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost