Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

autocad lt97, will pay for macro help

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
rickster
Asked:
rickster
  • 2
1 Solution
 
mark2150Commented:
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
 
ricksterAuthor Commented:
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
 
mark2150Commented:
I'm sure we can work something out. I've gotten your other email already.

M

0

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now