Greek or Nerd (Using links in OD Tables)

To start I’ll say I’m one of those geo-cache hunters that spends my free time looking for Tupperware hidden out in the woods using million dollar satellites. If you don’t know what a geocaching is here is a link. So thinking I would tie it into AutoCAD MAP3D and have a little advance over the next guy, I like viewing those little hidden treasure location in a map and see them all at once and in relation to each other.  As doing so I figured I would share a little solution that many Map3D users have asked over the years. That is how can I open a hyperlink from my data.

To start here’s a look at my map and the object data I have attached to my geocache points.

OD_Data

The points are the standard AutoCAD points with object data attached. The data contains a field with a value to a web site page. So how can I open the web page up to view it with out the old copy from the OD table and open my web browser and paste the value into it. Simple. Just use a little lisp routine that I’ll show you how you can customize to fit your Object Data table and fields names.

Here’s my version of the lisp file;

(defun c:FL (/)
  (setq ent (car (entsel “\nSelect point to follow link”)))
  (setq link (ade_odgetfield ent “waypoints” “url” 0))
  (command “Browser” link)
)

All you need to do  change the table name and field name to meet your meets. In my sample my table name is WAYPOINTS and field name is URL. Just write your lisp file with those changes after the (ade_odgetfield ent in line 3 of my example. Save the lisp file, load it in your drawing, then use the command FL to Follow your Links.

Now if you need to link to a image file or another file on your network I will post about using the object data document view tools that works for those later.

A quick video of it in action.

About these ads

3 Responses to “Greek or Nerd (Using links in OD Tables)”


  1. 1 mike 06/28/2010 at 12:04 PM

    The is great but I’m having trouble getting the lisp to work.

    All i get is…
    Command: fl
    ; error: too many arguments
    Command:

    not sure what the issue is

    • 2 map3d 06/29/2010 at 4:31 PM

      The line should look like this,
      (setq link (ade_odgetfield ent “YOUR OD TABLE NAME” “THE FIELD NAME” 0))

      Change the Your table name and The field name to match your OD Tables. The 0 at the end needs to be there also.
      Make sure the object you select has that OD Table attached.

  2. 3 Chris 06/18/2010 at 3:27 AM

    Ahh this is just what I was asking about the other day! I look forward to your next post.

    Chris


Comments are currently closed.



Archives

Readers Locations

Top Rated posts

Chat room


Follow

Get every new post delivered to your Inbox.

Join 32 other followers

%d bloggers like this: