Layout Patterns Missing

Hello All!

We have had this happen a couple times…

You have a layout file with a pattern fills that are working just fine. One day you open the file, and all of the patterns are missing…

and in Document Setup > References all the paths are gone!

I understand that Layout stores images in temporary system folders like this (in Mac at least)…

…/Library/Application Support/SketchUp 2021/LayOut/working/NR_LAYOUT.K6qmUu

And clearly a restart, cache dump, or software update must have broken the link to the temporary files.

Problem is, it’s hard to even troubleshoot this because it does not tell you the name of the file so when you click “Relink” you have no idea what you are re-linking.

So…

  1. Why do you think this happens? How do you prevent it?
  2. Is there a way to bulk update the links? Perhaps put all your patterns in the same folder as the Layout File?
  3. Is there a tried and true way to use pattern fills that is invulnerable to this problem? Each project gets its own pattern folder?

Thanks!

This sounds definitely odd. I don’t use a Mac but on windows the pattern images I use link directly to the original resources, so that when I update SketchUp I get prompted to load the newer versions of the pattern images. Have you used Copy/Paste to bring in your patterns?

1 Like

Images should not be in temporary system folders. At least not normally. The only time that would occur is if you are copying and pasting from a different application into LayOut and in the current version copied and pasted files should be automatically embedded so they aren’t tied to a temporary folder at all.

The natively supplied patterns should be in an Application Support folder. I disremember exactly what the path is on Mac but on Windows it is in C://Program Data/SketchUp/…

I wonder if you have an installation problem on your end. You might try reinstalling SketchUp and LayOut to make sure. It won’t hurt anything to do so anyway.

Which OS version are you using? Your profile only says OSX. It also says you are using SU2020. If you are using 2021, maybe you could update that.

1 Like

Thanks @DaveR and @Anssi

I did some tests and WOW there are a few things that I think are not ideal from a software development standpoint…

Here are the 4 ways to get images into Layout that I can think of and

1. File > Insert…

  • link: uses path relative to file location.
  • image not found
    • looks in the parent folder for the original image path including any subfolders.
    • If still not found, looks in that folder’s parent.
    • And so on with additional parent folders
    • if still not found creates a temporary file and the link shows up in a red font in Document Setup > References with the “Status” column set to “Missing”.
    • DOES NOT look in the same folder as the Layout file itself
    • if you move the image file back to the original relative path, Layout finds it again, even if you have saved, closed, and re-opened the Layout file.
    • if not found, even in the temporary file location, shows a red “X” on a grey background. No path or description is available in Document Setup > References so it is impossible to tell what image is missing or troubleshoot path issues.

2. Assign a fill from a pattern collection (folder) using the Pattern Fill Panel

  • link: uses path relative to file location.
  • image not found
    • same as File > Insert
    • Also, when the image file name is changed, the entry in the Pattern Fill panel still reflects the original name. You cannot change the name in the Pattern Fill panel apparently.
    • Unlike File > Insert, even when the pattern has been removed from any object fills, you can’t get rid of the entry in the Document Setup > References panel. It remains as blank with the red font and “Missing.” Even Purge or removing the custom collection from the Pattern Fill panel do not seem to get rid of the dead reference!

3. Drag and Drop

  • Exactly the same behavior as File > Insert. In other words

    drag and drop = File > Insert

4. Paste from Clipboard

  • Exactly the same behavior as File > Insert EXCEPT that

    • the image file immediately shows up in the temporary directory
    • the image shows up as “Embedded”
  • In other words

    Paste from Clipboard = File > Insert when original file is missing

Conclusions?

It is understandable that Layout would need to make provisions for dead file links. The biggest problem I see with the temporary folder stop gap is that often a Layout file is opened on a different computer that will not have access to the temporary files and will go to the Red X of Death. If that happens, it is also understandable. Users need to understand that Layout files often depend on external files that need to be in an accessible location, no matter who opens the file.

BUT…

I really think the Document Setup > References panel should display AT LEAST the original file name and perhaps also the original path to give users a way of troubleshooting the problem. Ideally, there would be a “Scan Folder for Missing Files” button with a checkbox for recursive searched that would allow a user fix all dead links in one routine.

I also think that the term “Embedded” is not accurate here. When an image shows up as “Embedded” in the Document Setup > References panel, either because it was Pasted from the Clipboard or the “Unlink” button was pressed, all it does is create a temporary file which, as we have discussed, is vulnerable to file system changes. Perhaps a truly “Embedded” option is a better stop gap where the image is packaged into the Layout file itself, similar to how Sketchup keeps materials internally.

Your thoughts?

1 Like

I have not investigated this recently, some of the issues described might be related to a bug fix in version 2020.
I believe there are more different types of elements in LayOut that might also have platform-dependances:
PNG-Jpeg-SketchUp Files-LayOut Elements (Scrapbook)-Patterns-excel-csv
All need to be examined…

UPDATE:

So there IS a way to Batch Restore Images suffering from the Red X of Death. I say “Batch” but really its just Find and Replace in a text file.

  1. Duplicate a .layout file so you don’t mess with the original
  2. change the extension to .zip
  3. open the file with your default archive utility
  4. you should see a folder with this structure (lines without extensions are folders):
  • ref
  • pages
  • styleManager.xml
  • references.xml
  • documentProperties.xml
  • document.xml
  • doc_thumbnail.png
  1. open references.xml in a text editor

  2. Run Find and Replace on all the errant paths. In my example I had to look for something like…

    /Users/fred/textures/dirt_earth_groundcover/earth.png

    and replace it with

    /Users/hank/textures/dirt_earth_groundcover/earth.png

  3. Save the file

  4. select all the files and folders noted above and compress them with your archive utility.

  5. Change the extension from .zip to .layout and open the file.

All references should be updated and in a black font indicating they were found at the external path you specified.

A couple Notes:

  1. You can also use this method to get rid of dead links that are “Embedded” but still don’t show any info in Document Setup > References. Just delete the line in the references.xml file.

  2. As you can see, I had to use a local file path…

    /Users/hank/textures/dirt_earth_groundcover/earth.png

    BUT I would prefer to be able to use a relative path like…

    …/textures/dirt_earth_groundcover/earth.png

    OR using the Mac Home Folder reference Tilde (~)

    ~/textures/dirt_earth_groundcover/earth.png

    OR even using some sort of Environment variable like

    $HOME/textures/dirt_earth_groundcover/earth.png

    But I could not get any of those to work. I did see in one file that it used {LO_APPDATA} to reference one of the folders within the Layout.app Package itself but I don’t know what the Home Folder equivalent would be.

  3. I checked how my restored file loaded on someone else’s computer and, sure enough, all the links were broken and referencing files in a Temporary folder. No Red X of Death but still concerning.

  4. Contrary to my original supposition, Layout does NOT make a temporary folder when it can’t find a reference. It makes a temporary folder EVERY TIME you open a file. Yeah, interesting! Mine was at…

    /Users/hank/Library/Application Support/SketchUp 2021/LayOut

    So you can watch the folders being created and deleted as you open and close files. These temporary folders are the same structure as the layout Zip file I described above. If it works properly the temporary folders should be deleted when you close the layout file. I found MANY temporary directories which must be remnants a partial save or crash.

  5. Finally, I am still not sure how my files lost all their paths in the first place. At least I can fix them now without too much duress.

1 Like