+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Senior Member Ohnoto's Avatar
    Using
    AutoCAD 2012
    Join Date
    Jul 2010
    Location
    Somewhere Between ACAD and LISP
    Posts
    154

    Default LISP Folder Directory and Hyperlink

    Registered forum members do not see this ad.

    Hello everyone,

    I have some LISP code to hyperlink blocks to a file. However, based on new folder structure my company has started using, I am trying to adjust it.

    We have a folder for drawings:
    /Project/03_Final/AwesomeCAD.dwg

    And within the cad drawing, I am wanting to hyperlink to photos at:
    /Project/02_Photos/AwesomeImage.jpg

    The way it currently works, the dwg file needs to be at the same location as images.

    Code:
    (setq URL (strcat "\\02_Photos\\" pID "-" sID "_" num0 ".jpg"))
    How would I modify this to hyperlink to another folder in the same project location?

    Thanks!


    Update:
    I got it to work using:

    Code:
    (setq URL (strcat (getvar "dwgprefix") "..\\02_Photos\\" pID "-" sID "_" num0 ".jpg"))
    However, I need to path to be relative.
    Last edited by Ohnoto; 26th Sep 2013 at 06:05 pm.


  2. #2
    Full Member
    Using
    AutoCAD 2013
    Join Date
    Dec 2012
    Posts
    53

    Default

    I do not really understand the request nor the issues you have. Maybe post the code so it may be more clear. Thanks!

  3. #3
    Senior Member Ohnoto's Avatar
    Using
    AutoCAD 2012
    Join Date
    Jul 2010
    Location
    Somewhere Between ACAD and LISP
    Posts
    154

    Default

    I can't post the full code. It was not written by me, but a co-worker, for company purposes, and is pretty long. I was going through it to tweak a bit to what I needed it to do.

    Our folder structure here is:

    Project Name
    • 01_WIP
    • 02_Photos
    • 03_Final
    • 04_Sent to Client
    • 05_3D Files

    When we do send a project to a client, we send the 02_Photos folder and 03_Final folder.

    Within our drawing, we have a block that represents where photos were taken from. Our owner is wanting to have these hyperlinked when sending to a client.

    When I was stating relative before, I was in the mindset of relative path, like xrefs, where xrefs will stay attached across folders, as long as the folder structure is intact.

    We do have it LISP to work, but only when the photos folder is in the same folder as the drawing. I was looking to see if there was a way to keep them connected across folders.

    From what I have been researching, it may not be possible dealing with hyperlinks, but I'm hoping someone can prove me wrong.


  4. #4
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Sep 2011
    Location
    Sweden
    Posts
    40

    Default

    Registered forum members do not see this ad.

    Could it be HYPERLINKBASE you are looking for?
    In Autolisp:
    Code:
    (command "hyperlinkbase" "c:\\temp\\")
    You could also look at this:
    http://docs.autodesk.com/ACD/2010/EN...mber=d0e170620

Similar Threads

  1. LISP problem (Import directory of blocks into template drawing)
    By 3dwannab in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 28th Apr 2013, 07:51 pm
  2. create directory Visual Lisp
    By au-s in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 15th Oct 2010, 04:51 pm
  3. Creating folder using LISP
    By Heyner in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 12th Sep 2010, 02:29 pm
  4. Inserting hyperlink to excel through visual lisp
    By Ahankhah in forum AutoLISP, Visual LISP & DCL
    Replies: 7
    Last Post: 14th Aug 2010, 02:30 pm
  5. Directory Lisp
    By neekcotrack in forum AutoLISP, Visual LISP & DCL
    Replies: 22
    Last Post: 24th Oct 2008, 10:09 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts