Automating Drawings in Autocad

Does anybody know how to control x,y,z position and visibility of an object and/or block on autocad 2002 (or greater) from an external database (like access, csv, txt,...), this is becouse i want to automate the location of fire-extinguishers/alarms/wiring/... on lots (more than 175) of blue-prints of a building. Any comments? TIP: Using AutoLISP may require to learn a new programing language (witch may be really time consuming), and using the DBConnect I can't assign coordinates, only tags?

Reply to
Anonimo
Loading thread data ...

I don't know enough AutoLisp to help you, other than to say, I think this must might be a piece of cake for somebody who knows the language.

Somebody could write an AutoLisp program that (a) reads in a row from a file containing coordinates and other attributes, (b) inserts a new block, giving it the attributes that you just read in from the text file.

This web site has an introduction to AutoLisp. It also helped me with some of the details of the code mods that I did. I asked for some suggestions and Jeff answered within a day.

formatting link

Reply to
Steven M (remove cola to reply)

That's a fantastic bit of information for the AutoCAD challenged!

NOTE: I don't know when it was written, but for as long as I remember, Notepad had a Search-and-replace. In particular, the Notepad that shipped with Windows 2000 can do it.

NOTE 2: It also works in AutoCAD LT 2000, that surprised me. Of course, not every command in LT has a command line equivalent, and LT doesn't have AutoLisp but that's fairly simple to add. I have LT Boost Extreme from

formatting link
and it works great. Or maybe one of these:

IcomTools at

formatting link
LT-Extender 2000 Plus at
formatting link

Thanks again.

Reply to
Steven M (remove cola to reply)

I've seen lisp files that take coords from a csv file (insblk.lsp). but the problem is that you have to do an appload for every drawing, is there a way to do a lisp program that works on several documents at a time?

Reply to
Anonimo

My installation of AutoLisp comes from an add-on program called LT Boost Extreme. I have it set so that it loads with every new drawing, automatically.

The AutoLisp commands that I use are all called by clicking on a button. Some of them I use many times in a single drawing, other times only once.

What I have done sometimes is, select all the drawings in a folder, press Enter to open them all (up to about 60 at one time). Then position my mouse in the right place in AutoCAD and click the button

60 times. Each click executes the commands I need, then saves and closes each file.

However, this still requires one mouse click per file. I don't know how to automate this so that I wouldn't have to touch each file in AutoCAD.

I'm sure there is a way, and if there is, somebody in this group can point you in the right direction. I would also recommend another group, comp.cad.autocad.

Steven

Reply to
Steven M (remove cola to reply)

How about automating using VBA?

any feedback?

Reply to
Anonimo

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.