Solved

autocad lt97, will pay for macro help

Posted on 1998-09-29
3
168 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
Comment Utility
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
Comment Utility
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
Comment Utility
I'm sure we can work something out. I've gotten your other email already.

M

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now