Jump to content

AutoCad and Excel


Sean teh Civil

Recommended Posts

I have been stuck on this problem for some time now. First I need to give some background to my project. I am doing a utility GIS for an entire college campus. Each utility type (Electric, Sanitary, Storm, etc.) have blocks identifying information going to structure found for the respective utility. For example, the storm sewer utility has a curb inlet with a block next to it that has the unique ID number, utility type and location associated for that one particular structure. These are set as attributes for the block.

 

 

What I want to happen is when someone clicks on a block, say the block next to the curb inlet for storm sewer, an Excel sheet opens and the value of one cell changes depending on the particular block. That one cell then updates the sheet to display all the data about that one particular structure through VBA which I have already completed. I am under the assumption that this block attribute is what actually communicates with Excel.

 

 

Where I am stuck is I have no idea how to make AutoCAD open Excel and then change the value of a cell depending on the block the user clicked on. Is there a way to accomplish this?

 

 

From what I have gathered so far, this might be done through either an AutoLISP or VB.NET using MS Visual Studio. I have zero experience with both and honestly I have no idea what the difference is between the two possible solutions.

Any help on this problem would be greatly appreciated.

 

 

Thanks,

Link to comment
Share on other sites

The short answer is "yes" you can do that. It's not that difficult and there are several different ways you can do it. There is a program out there on the Internet called "GetExcel". It was written by a guy named Terry Miller and it will do most anything you want with Excel from LISP. It is however a big, bulky, one size fits all routine but spending a little time with it, you can probably piece-meal out the parts you want to work with. VB.NET is another excellent source for getting Excel and AutoCAD to work together as is C# or any of the .NET tools in Visual Studio. I recommend getting a copy of Visual Studio 2012 Express from Microsoft. It's free and works with several different languages.

 

Having zero experience with these programming languages is certainly going to make your work harder. If you need assistance, there are lots of people in this forum who can try to help, but it sounds like you need to approach "one of us" for a contract to handle this. That is if it's worth that much to you and/or your employer. Otherwise you can start your learning curve this weekend.

Link to comment
Share on other sites

This task is more a GIS situation which is why they build them that way rather than a CAD & Excel, I would look at MAP to do what you want it has the ability to do whats known as SQL "please show me pits in Brown street type 1" It can be purchased sepeately or its bundled with Civ3D its a Autodesk product designed for GIS. Our city wide system using Oracle is one of the biggest in Australia you name it we can enquire about it. I will post an image of an example like what your doing when I am at work. Map allows for linking to our Oracle system using Autocad Map as the front end, but the GIS manager said no. We have a number of purpose written routines to export dwg for our use.

 

I can not reccomend more have a good look at MAP the tutorials are based around a City utilitys and buildings. Found this at Autodesk

 

http://docs.autodesk.com/MAP/2011/ENU/AutoCAD%20Map%203D%202011%20Help/Map3D_2011_HTML_Help/indexTutorials.html?url=./filesTutorials/WS73099cc142f487551e5a0cb10850d4cd7c-74f7.htm,topicNumber=Tutorialsd0e55

Edited by BIGAL
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...