Go Premium for a chance to win a PS4. Enter to Win


autocad lt97, will pay for macro help

Posted on 1998-09-29
Medium Priority
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    rharpenau@rooftile.com
Question by:rickster
  • 2
LVL 12

Accepted Solution

mark2150 earned 400 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

972 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