autocad lt97, will pay for macro help

Posted on 1998-09-29
Last Modified: 2010-04-30
We need a way to link or export 15 layers and their respective measurements (length, area, unit) to an Excel spreadsheet or similar.  As we do or draw in each layer it is desirable for us to be able to calculate these "take-off" numbers in some form of table.

Does anyone know of a solution, consultant, work-around, third party plug-in or programmer that could provide this funcionablility.

We tried Reporter.exe and found that we had to cut and paste in order to get it into excel.  If we could get it to automatically link or embed those measurements into excel it would be awesome.

Any help or direction would be greatly appreciated.

Thanks in advance.

Rick Harpenau, Stuart, FL  Estimating  RTA
561-223-0005  x1269
Question by:rickster
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 12

Accepted Solution

mark2150 earned 100 total points
ID: 1437219
You need to use attributed blocks when you create your drawing. The blocks have invisible (optional) "tag along" fields that contain data references. You can export the data to an external file with the ATTEXT command. This will generate a comma delimited file that you should be able to pull into EXCEL with little or no modification. There is a bit of art to this as you need an external configuration file that defines the data elements to be extracted and their formats (this is not well documented and difficult to locate references to). Anyway, you can then pull whatever you need out of AutoCAD. Since AutoCAD can be scripted you can essentially create an AutoCAD macro to do all the dirty work in one shot. You would then run an Excel macro to pull the data in.

If you wanted to get *really fancy* you can have something like Visual Basic script both the AutoCAD and the Excel to run both programs thru their paces sequentially.

You can also reverse the progcess. You extract the data from the Excel spreadsheet and then have a bit of VB convert the data into a drawing script. The changes in the Excel can then be pulled into the AutoCAD and your drawing get's rebuilt based on the Excel data.

The full blown versions of AutoCAD accept OLE objects and you can connect that way as well.

The difficult part is that your drawings need to be generated with the attributed blocks. If you've already drawn the drawings without planning for the attributed blocks, you now have to regenerate the drawing with the attributed blocks to give the program something to extract.

If you need everything in the drawing you can blow it out to a .DXF format. This format is ASCII and contains every object on the drawing. You can determine the object properties by inspection as they are pretty obvious. (ie. a line has two pair of X,Y co-ords, layers, linetypes, etc.) You'ld have to write an extraction utility, but that shouldn't be that hard depending on what you're trying to pull out.


Author Comment

ID: 1437220
wow, thanks for your time in such a lengthly reply.  is there any way you could assist us with this on an hourly basis?  your reply was excellent and we'll try to get it going this afternoon.  i just thought we might still have some problems, tweaking and questions and being able to call ya and get advise would be awesome.  we could send a retainer out perhaps.  let me know.  thanks.

daytime email is
and phone is 800-586-7663  x1269
feel free to call
later :-)
LVL 12

Expert Comment

ID: 1437221
I'm sure we can work something out. I've gotten your other email already.



Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question