rickhebert Posted July 1, 2010 Share Posted July 1, 2010 Hello and thanks for this great resource. I have quite a number of tables data linked to Named Ranges in an excel spreadsheet. But the spreadsheet name and server location changes, as is my company's policy to do, reflecting the project being worked on. Is there a way to automate the process of renaming every data link in lieu of going to the data manager and re-linking every one of them individually? In other words, I would like to specify the new name and location of the spreadsheet and have it update all the links accordingly. Can this be done? TIA- Quote Link to comment Share on other sites More sharing options...
rickhebert Posted July 1, 2010 Author Share Posted July 1, 2010 I found a solution to my problem. Create a Unique folder named specifically to the project. Using Relative Path option in Data Link Manager and naming the Excel spreadsheet identical every time, and just storing the drawing and the spreadsheet in that folder. So each project will have a unique folder with a unique ACAD drawing linked relative to a spreadsheet with the same name in that folder but with different data in it. The tables in the drawing maintain their layout format and update when you use the Datalink Update menu Voila! Quote Link to comment Share on other sites More sharing options...
dbroada Posted July 1, 2010 Share Posted July 1, 2010 glad you are sorted. I have a similar problem with people renaming/moving folders for their own good without thought for anybody else. I was going to suggest using a relative path option for you but I couldn't find one in my datalink manager. Quote Link to comment Share on other sites More sharing options...
rickhebert Posted July 1, 2010 Author Share Posted July 1, 2010 I see, What ver ACAD are you working with? My company is using 2011, and I found it when you right click on a data link thats been previously created and choose "EDIT" or When you create a new datalink, it is the option just under where you choose the path called "Path Type" It is the same dialog box for either You get to choose one of three otions in "Path Type"; 1) Full Path 2) Relative Path 3) None I see how Full and Relative could be used, but I haven't a clue what "None" might be used for! Have a great day Quote Link to comment Share on other sites More sharing options...
MarkytheSparky Posted May 18, 2018 Share Posted May 18, 2018 Is there anyway to automate the renaming of the file itself? My company changes the name of the file from time to time... ExcelFile-REVA.xls, ExcelFile-REV-B.xls... There has to be a way to automate the name change - the datalinks are stored in a dictionary file for the drawing... This code lets you list out the Datalinks (defun c:ListDictionaries ( / ed ed1) (_> (prompt "\nDictionaries in current drawing: ") (_> (foreach ed (entget (namedobjdict)) ((_> (progn (((_> (cond ((= (car ed) 3) (((((_> (prompt (strcat "\n" (cdr ed)))) ((((_> ((= (car ed) 350) (((((_> (progn ((((((_> (foreach ed1 (entget (cdr ed)) (((((((_> (if (= (car ed1) 3) ((((((((_> (prompt (strcat "\n " (cdr ed1))) ((((((((_> ) (((((((_> ) ((((((_> )) ((((_> ) (((_> ) ((_> ) (_> (princ) (_> ) But how do you change the name of the file if the Cell References do not change from REV to REV? SO CLOSE BUT SO FAR AWAY Quote Link to comment Share on other sites More sharing options...
SLW210 Posted May 21, 2018 Share Posted May 21, 2018 Please read the Code Posting Guidelines and have your Code to be included in Code Tags.[NOPARSE] Your Code Here[/NOPARSE] = Your Code Here 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.