Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

MS Access and AutoCAD Hyperlinks!!!!

Status
Not open for further replies.

Kckronic21

Programmer
Jul 29, 2001
81
US
I have created an equipment database in MS Access that shows all of the equipment information in my AutoCAD drawing. I have created a form in MS Access that users can access all the the equipment throughout the drawing. What I would like to do is to have a location field added to my database in my form that is a hyperlink, so when the user presses the hyperlink, it excecutes the AutoCAD drawing and goes to the location of the equipment in the drawing. Does anyone know if this is possible? Thanks!
 
there is a way that I know of, but its kinda cheating...
First off, you can have a link to a .dwg file in MS Access, just create the link as
C:\my drawings\folder1\subfolder1\drawing.dwg
what this will do is open up acad and the specified drawing.
The thing is that its not zoomed to the location of the equipment.
the only way around this that I can think of is to save that drawing as something else, that no one can change by making it read only or whatever, and before saving it, zoom to the location of the equipment. So that when its opened it will show the last saved view as acad does. This can cause problems if there are alot of drawings and people want to work on them constantle, but it they are just drawing for reference, you can do the above and save them in a read-only folder...

sorry but this is the only work around I can think of!!! Jay~

My new Tae Kwon Do website is up and running!!

~KeyTech
 
If your equipment is stored in the AutoCAD drawing in blocks, and the blocks have some unique identifier, you could start up AutoCAD with a script file (which you can write out before starting AutoCAD), and pass in the unique identifier.

ie run this
<path to autocad>\acad.exe DRAWING.DWG /b c:\temp\script.scr

script.scr would be as follows where UNIQUE_ID is picked from the database.

(load &quot;mylispfile&quot;)
(zoomtoblock &quot;UNIQUE_ID&quot;)

You would need to write a lisp function to find the block, and zoom in around it, but I would need a bit more information about the drawing and blocks to help with that.

If you store the location of the equipment in the database, you could use a similar technique, but the script would be as follows, with X1, Y1 and X2, Y2 being the window you wish to zoom in on.

zoom
w
X1,Y1
X2,Y2

Hope this gives you some ideas.

Nick
nick.hall@altasystems.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top