Solved

autocad lt97, will pay for macro help

Posted on 1998-09-29
3
170 Views
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
0
Comment
Question by:rickster
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
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.

M
0
 

Author Comment

by:rickster
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
rharpenau@rooftile.com
and phone is 800-586-7663  x1269
feel free to call
later :-)
0
 
LVL 12

Expert Comment

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

M

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

786 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