Ohnoto Posted September 26, 2013 Share Posted September 26, 2013 (edited) 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. (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: (setq URL (strcat (getvar "dwgprefix") "..\\02_Photos\\" pID "-" sID "_" num0 ".jpg")) However, I need to path to be relative. Edited September 26, 2013 by Ohnoto Quote Link to comment Share on other sites More sharing options...
Pietari Posted September 27, 2013 Share Posted September 27, 2013 I do not really understand the request nor the issues you have. Maybe post the code so it may be more clear. Thanks! Quote Link to comment Share on other sites More sharing options...
Ohnoto Posted September 27, 2013 Author Share Posted September 27, 2013 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. Quote Link to comment Share on other sites More sharing options...
ripuz Posted September 29, 2013 Share Posted September 29, 2013 Could it be HYPERLINKBASE you are looking for? In Autolisp: (command "hyperlinkbase" "c:\\temp\\") You could also look at this: http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a9193826455f5ffa23ce210c4a30acaf-5831.htm,topicNumber=d0e170620 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.