Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Drawings using MS Access as a database

Status
Not open for further replies.

lordoflumens

Electrical
Sep 23, 2003
2
I need to blast MS Access97 field text into multiple wiring diagrams drawings using a template drawing and a Lisp routine. The graphics in these drawings is identical except for "TEXT" (Motor name, number,location, plc address, etc). Is there a publication that details this procedure better than the Autodesk Users guide. Anyone?
 
Replies continue below

Recommended for you

Heres what to do. (I assume you know how to use access better than I do) Bellow is an example.
I created a file named insert_text_two.dwg (note it is best to avoid using spaces)
The file has everything drawn out plus I have two parts of text that can be changed.
To make text that can be changed goto:
Draw/bloocks/Define attributes

Put in a tag (I recomend using your your access column names)
Put in a prompt (use the same as the tag name)
leave value blank
Pick or specify insertion point
Specify text options as per your preference

save file (make sure directory path has no spaces)

now your on the access side of things

make access create a text file with the following thing
'do not put in parts after the' mark
-insert 'just an enter after insert no spaces
u:\insert_text_two.dwg 'or whatever path and file name
0,0,0 'specifies origon as reference point
1 'scale factor
0 'angle
text for each value here 'note spaces aren't a good idea
' if they are unavoidable you
' might ba able to do something
' with quotes or using a lisp
' routine(I use autocad light so
' lisps are out of the question"
The file needs to be saved with the extension .scr
when you open autocad from access
you wil do something like this

stBatch = " /b S:\cd-eng\access.scr"
QUOTE = """"
stAppName = "P:\AutoCadLT_2000\aclt.exe"
stFileName = Me.Path & "\" & Me.File_Name
Call Shell(stAppName & " " & QUOTE & stFileName & QUOTE & stBatch, 1)


anyhow this should get you started.

Tim


Command: -insert
Enter block name or [?]: u:\insert_text_two.dwg
Specify insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]: 0,0,0

Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>: 1
Enter Y scale factor <use X scale factor>: 1
Specify rotation angle <0>: 0

Enter attribute values
Name: My Name Here
Date: My Date Here
 
hum, that is a good idea... you can use this for multiple drawings and one data base?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor