Generating CAD dwgs from Access

J

jchav

Hello,



Weak in AutoCad, zero experience w/ SQL, and a beginner with VB. I'm hoping
to generate CAD drawings from Access using VB.

Here's what I'm trying to achieve between Access (2003) & AutoCad (2008).

1. Open a "Loop Diagram" form in Access. Loop# filter is initialized as
blank.

2. Select & filter 1 or more loop#s via the form.

3. Each loop# involves 1 or more records. Each record would have a tag,
junction box#,

template ID, cable#s, etc.

4. The form has both "Create Current Loop" and "Create All Loops" buttons.
The former lets you

generate a loop diagram based on the current loop# shown. The latter
lets you generate loop

diagrams based on the filtered set of loop#s.

5. Clicking either of the buttons will initially open the 1st loop#'s CAD
template & do a search-and-

replace of the info in item#2 from Access into the dwg.

6. A "Save As" of the "populated" template into a pre-determined folder
happens with the filename

being "Loop#.dwg".

7. Item#s 4 & 5 are carried out for the succeeding loop#s.

8. A dialogue message like "Operation Completed" appears in the end.



There will be quite a few CAD templates setup for the various applications.
I'm not sure if the whole process can be done in the background

while I still multi task on other work. If not, then it's still ok. Any help
(ideas, sample code, overall direction) would be greatly appreciated.



jchav
 
A

Arvin Meyer [MVP]

AutoCAD uses VBA as a programming language, but I'm not sure if you can do a
drawing from VBA. Assuming you can, Set a reference in an Access code window
(Tools >>> References) to AutoCAD, then open the Object Browser (View >>>
Object Browser) and take a look at the methods and properties that you can
use. One of the AutoCAD newsgroups ought to be able to get you started with
the code you'll need to use.
 
G

Guest

It has been a long time since I played with autoCAD but I used to create lisp
programs to do this type of thing. Then called it from vba? Google it, you
should get some more useful info.
 
S

saima

@yahoo.com
Arvin Meyer said:
AutoCAD uses VBA as a programming language, but I'm not sure if you can do a
drawing from VBA. Assuming you can, Set a reference in an Access code window
(Tools >>> References) to AutoCAD, then open the Object Browser (View >>>
Object Browser) and take a look at the methods and properties that you can
use. One of the AutoCAD newsgroups ought to be able to get you started with
the code you'll need to use.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top