20 Replies Latest reply on Dec 6, 2018 12:58 PM by appytastic

    See what files parent link is linked to?

    appytastic Level 1

      Hello!

      Is there any way to figure out what files a parent document is linked to?

      Example: I have used the content placer to link a block of text into 4 documents. How can I quickly figure out those 4 documents later from the parent document?

       

      Thank you!

        • 1. Re: See what files parent link is linked to?
          maxwithdax Adobe Community Professional

          As long as you placed the content with the linked option checked then you can simply press command(ctrl) + Shift+D to open the links dialog box (window>Links) and see where they were linked. You can also right click and choose "reveal in explorer (finder)"

           

          links.jpg

           

          reveal.png

           

          Hope that helps

          -Dax

          • 2. Re: See what files parent link is linked to?
            appytastic Level 1

            Thank you for your response Dax- however it doesn't answer my question.

            While that works for figuring out where the linked file originated from- I need to figure out how to find out the opposite path.

             

            File A is linked to B, C, D, and E (the children)

            I want to see that information while looking at file A (the parent).

            Your response applies to if I have B, C, D or E open (unless I am really missing something).

             

            Is there a way to do this?

            Thank you!

            • 3. Re: See what files parent link is linked to?
              maxwithdax Adobe Community Professional

              Ah... no..sorry. that is not possible at this time. Would be a nice feature request though. You would have to setup a "Watch directory" to know where to look though. Would be an interesting option. Might consider adding a feature request.

              Feature Request/Bug Report Form

               

              - Dax

              • 4. Re: See what files parent link is linked to?
                rob day Adobe Community Professional & MVP

                It should be scriptable, what OS are you using?

                • 5. Re: See what files parent link is linked to?
                  appytastic Level 1

                  I am using Mac OS Mojave

                  • 6. Re: See what files parent link is linked to?
                    appytastic Level 1

                    Will be sure to do that Dax, thanks!

                    • 7. Re: See what files parent link is linked to?
                      rob day Adobe Community Professional & MVP

                      I think this question came up before and I might have something in my AppleScript library, will check later today.

                      • 8. Re: See what files parent link is linked to?
                        rob day Adobe Community Professional & MVP

                        Try this AppleScript.

                         

                        It asks for an enclosing folder with the  files to search for, and then asks you to choose a file that might be linked—the placed file can be anywhere. The script loops thru the chosen folder and leaves any files with the chosen file as a placed link open.

                         

                        Open this .zip archive and copy the script inside to your ID scripts folder

                         

                        http://www.zenodesign.com/forum/OpenAndCheckForLink.zip

                        1 person found this helpful
                        • 9. Re: See what files parent link is linked to?
                          appytastic Level 1

                          Thank you for that scrip Rob! I tested it out and it looped through the process but did not leave the linked file open as it sounded like it is supposed to do.

                           

                          I tested it by running the script using the parent file (per my needs- I know where the parent is at all times, I'm just trying to gather in the children to sync updates), and it did not recognize the file with the child in the folder I specified.

                          I also ran it on the child with the same result.

                           

                          I appreciate your help on this and did fill out a feature request.

                          • 10. Re: See what files parent link is linked to?
                            rob day Adobe Community Professional & MVP

                            I think we might be reversing the meaning of child and parent—I think of child as the placed link and its parent as the ID file with the child placed.

                             

                            So here the folder I'm going to search is FolderToSearch, which has 3 InDesign files with links in the folder PlacedChildren:

                             

                            Screen Shot 6.png

                             

                            The script then asks for a file that might be placed in any of the FolderToSearch files, and I choose ChildA.indd

                             

                            Screen Shot 7.png

                             

                            ChildA.indd is placed in Parent1wA and Parent2wA, so they are left open:

                             

                            Screen Shot 8.png

                             

                            Here's a Dropbox with my test files:

                             

                            Dropbox - ParentChildTest

                            • 11. Re: See what files parent link is linked to?
                              appytastic Level 1

                              With your test files, the script is working (and yes, it does exactly what I am looking for)

                              And yes, our wording does seem to be reversed- I call the document with the placed link the child, and the file holding where the original content is (where the universal editing would occur) the parent. =)

                               

                              With my files it is not working however. It's running through the proper file and is doing it's thing- but on my test file it is not leaving open the document where the link has been placed.

                               

                              I think the script isn't working because I placed the content using the content place tool. (yes, the content is still definitely linked) I did not place an indd doc within another indd doc

                               

                              How my parent file is named: Parent-ud.indd

                              How it displays in the link panel: Parent-ud.indd#<Test text...>

                               

                              Is there a way to adjust the script to look for the file name but allow for the variables (#< text >) that follow it? So basically the if statement "if mylinkname is not in llist then"... has a beginning or contains statement (or something more appropriate- I can get around reading applescript but I don't have much experience writing it), I think this would fix the problem.

                               

                              What would you suggest?

                              By the way, have I mentioned you're awesome Rob?

                              • 12. Re: See what files parent link is linked to?
                                rob day Adobe Community Professional & MVP

                                How it displays in the link panel: Parent-ud.indd#<Test text...>

                                That probably is the problem. I'll take a look and see if there's an easy fix.

                                • 13. Re: See what files parent link is linked to?
                                  Toughmedia Adobe Community Professional

                                  In Adobe Bridge you can right-click on your INDD-File to show ALL linked files…

                                   

                                  Hope, that helps.

                                  • 14. Re: See what files parent link is linked to?
                                    rob day Adobe Community Professional & MVP

                                    Right, but the OP wants to get a list of the ID files the linked file is placed in—the reverse of showing a chosen ID file's links.

                                     

                                    I'm skeptical that the feature is possible. My script is searching through a chosen folder and checking every ID file's link list for a name match, but that doesn't mean all of the files containing the link are in that folder, or even on a local drive or network. If the search folder has hundreds of ID files the script might timeout or crash ID

                                    • 15. Re: See what files parent link is linked to?
                                      rob day Adobe Community Professional & MVP

                                      How my parent file is named: Parent-ud.indd

                                      How it displays in the link panel: Parent-ud.indd#<Test text...>

                                      Can you dropbox me an example with the variable usage?

                                      • 16. Re: See what files parent link is linked to?
                                        appytastic Level 1

                                        Here is the link to my test files:

                                        Dropbox - ID Link Test Files - Simplify your life

                                         

                                        As you can see, the placed content shows the ID file name as usual, but is followed by a #<> where the <> contain the first portion of the grabbed content. So if there is a way to do the code where it looks for the file name but ignores everything after .indd I think it should work.

                                        • 17. Re: See what files parent link is linked to?
                                          DBLjan Level 3

                                          Im unable to check your file (firewall), but am I missing something here? When I place an InDesign-file into InDesign, i can expand the tree to see whats inside the linked InD-file, and check their paths.

                                           

                                          Bildschirmfoto 2018-12-05 um 16.55.43.png

                                          • 18. Re: See what files parent link is linked to?
                                            maxwithdax Adobe Community Professional

                                            Please start reading from the beginning thread for clarity. He is looking for a way to lookup every InDesign file a source might be linked to.

                                            "File A is linked to B, C, D, and E (the children)

                                            I want to see that information while looking at file A (the parent)."

                                            • 19. Re: See what files parent link is linked to?
                                              rob day Adobe Community Professional & MVP

                                              The code below seems to work on the files you posted. I'm using CC2018 on High Sierra.

                                               

                                              I think the usage of parent and child is really confusing so I changed the dialogs a bit. The script now asks you to choose the placed file first, followed by the folder containing ID files to search through.

                                               

                                              You might have to watchout for folders with too many files, you could run into memory issues.

                                               

                                               

                                              (* 
                                              Rob Day 2015-2018 
                                              Opens all of the ID files in a chosen folder and checks for the parent of specified placed child file. 
                                              If the link name is not found document is closed
                                              *)
                                              
                                              
                                              global mylinkname
                                              
                                              tell application "Finder"
                                                  
                                                  set the cFile to (choose file with prompt "Choose a Placed File to Search for.")
                                                  set mylinkname to name of cFile
                                                  
                                                  set the dfolder to (choose folder with prompt "Choose a Folder containing InDesign Files to Search.")
                                                  set flist to (every file of entire contents of folder dfolder) as alias list
                                                  
                                                  my checkLinks(flist)
                                                  tell application "Adobe InDesign CC 2018"
                                                      activate
                                                  end tell
                                              end tell
                                              
                                              -------------------------------Functions----------------------------------
                                              
                                              on checkLinks(flist)
                                                  tell application "Finder"
                                                      
                                                      repeat with f in flist
                                                          --check for InDesign fiiles
                                                          if creator type of file f is "InDn" then
                                                              tell application "Adobe InDesign CC 2018"
                                                                  --activate
                                                                  set user interaction level of script preferences to never interact
                                                                  try
                                                                      open f
                                                                      tell active document
                                                                          --use the links file path rather than the name
                                                                          set llist to file path of every link
                                                                          set nlist to my getNames(llist)
                                                                          if mylinkname is not in nlist then
                                                                              close
                                                                          end if
                                                                      end tell
                                                                  end try
                                                                  set user interaction level of script preferences to interact with all
                                                              end tell
                                                          end if
                                                      end repeat
                                                  end tell
                                              end checkLinks
                                              
                                              --gets the last item of the file path (the file name)
                                              on getNames(theList)
                                                  set nlist to {}
                                                  set oldDelimiters to AppleScript's text item delimiters
                                                  set AppleScript's text item delimiters to ":"
                                                  repeat with x in theList
                                                      set n to every text item of x
                                                      copy last item of n to end of nlist
                                                  end repeat
                                                  return nlist
                                              end getNames
                                              
                                              1 person found this helpful
                                              • 20. Re: See what files parent link is linked to?
                                                appytastic Level 1

                                                This worked perfectly!

                                                Thank you so much Rob!