Author Topic: AutoCAD and Excel  (Read 4728 times)

0 Members and 1 Guest are viewing this topic.

Sean the Civil

  • Guest
AutoCAD and Excel
« on: February 01, 2013, 12:12:46 PM »
I have been stuck on this problem for some time now. Not sure which board this belongs in either. 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,

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: AutoCAD and Excel
« Reply #1 on: February 01, 2013, 03:39:08 PM »
Sounds like you might want to use Data Extraction??

http://www.youtube.com/watch?v=VPD0FxbPz8Q
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

fixo

  • Guest
Re: AutoCAD and Excel
« Reply #2 on: February 02, 2013, 05:18:52 AM »
I thought it could be doing by this way:
say, select all curb inlet blocks on layout then create
table and populate them with block handles and its attributes then
create the link between this table and excel, or I'm missing something,
so sorry for that...

Tyke

  • Guest
Re: AutoCAD and Excel
« Reply #3 on: February 02, 2013, 10:03:57 AM »
We work with a client who has a extremely large GIS (Intergraph) covering several hundred thousand square kilometres of electricity supply cables and who routinely sends us extracts in DXF format. All of the data attached to objects is XDATA and it was simple enough to write a viewer in VBA to display the data. It is easy enough to attach XDATA (XRECORDS would be an alternative too) to AutoCAD ojects using VBA/.NET. Personally, I think you would save yourself a lot of grief by not using blocks and attributes and look into using XDAT instead.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: AutoCAD and Excel
« Reply #4 on: February 04, 2013, 04:36:13 AM »
why not attach a data table using MAP; if you are using Civil 3D this is easy to accomplish....otherwise not so much
Be your Best


Michael Farrell
http://primeservicesglobal.com/

bchapman

  • Guest
Re: AutoCAD and Excel
« Reply #5 on: February 10, 2013, 12:57:41 AM »
Yes there are functions to write to an excel spreadsheet.  You'd need specific help for your application though... but there might be alternatives that are better for your situation. Such as actually using GIS software, google earth, KMZ files... all becoming more and more available and user friendly for everyone. If you sent the CAD file and excel spreadsheet I might find a solution, unfortunately your request would take several hours of my life and it would have to wait a few days... otherwise I'd recommend asking this gentleman if you could hire him and he could accomplish such a service: http://www.lee-mac.com/index.html  ...