sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Batch import raster images

    Scheduled Pinned Locked Moved LayOut Discussions
    layout
    8 Posts 4 Posters 1.8k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      Pout
      last edited by

      Is it possible in layout to automatically import a set of raster images and put each of the images in the set on a new page?

      1 Reply Last reply Reply Quote 0
      • B Offline
        bjanzen
        last edited by

        Sorta, through SketchUp. Read http://forums.sketchucation.com/viewtopic.php?f=13&t=25189&p=216312&hilit=template+scene+page#p216312 and let me know if it's not clear.

        We've also blogged some about this:

        Link Preview Image
        Connecting SketchUp Scenes to LayOut Templates

        Follow the SketchUpdate blog for SketchUp news, modeling tips and tricks, user stories and more.

        favicon

        (sketchupdate.blogspot.com)

        b

        1 Reply Last reply Reply Quote 0
        • D Offline
          danbig
          last edited by

          Another approach may be to try the following:

          Create a LayOut template, with the desired number of pages, with one raster image linked on each page. Have a different raster file per page, and put all the images in the same folder.

          Create a new LayOut document using the template, and then overwrite the linked raster images with your batch of images for the document.

          This would be more work than creating the document manually, but may save time if this is a process you plan to do many times over.

          1 Reply Last reply Reply Quote 0
          • P Offline
            Pout
            last edited by

            bjanzen,

            Thx for the answer but I create the images for a reason. (Being: SU not keeping diff. in materials between Scenes and layout not triggering Scene observer)
            So the use of scenes (untill this is solved) is not possible.

            danbig,

            Thx, i'll see if I can get further with this. The problem is that the amount of images differs each time.
            As i understand your approach:
            Make a template with 1 image on each page, that image is in a directory
            Rename the images that are needed to the template images and put them in the same directory as the template images (thus overwriting them)
            Et voila. πŸ˜„ (untested)

            As stated the problem is i do not know the exact amount of images. I'll see if i can find a workarround for that.

            1 Reply Last reply Reply Quote 0
            • DavidBoulderD Offline
              DavidBoulder
              last edited by

              If your comfortable working with an XML file you can try this. Of course you can also really mess things up, so work on a copy.

              Rename your file.layout to file.zip. When you open the zip files you will see a series of directories and XML files. Back when I used to do this (in ver 1.0) I think things were a little simpler. I see more XML files than I remember, and the code is more complex in some areas. There are a few top level xmls, and then under a "pages" directory" is an xml for every page.

              Here is a sample object from a page.

              
                       <e;image id="id1367">
                          <e;placedFileReference>
                            <e;rectangleBase height="3.531425" width="4.565884" x="1.876357" y="1.966594">
                              <e;graphicEntity shouldFill="0" shouldStroke="0"/>
                            </e;rectangleBase>
                            <e;clipMask>
                              <e;rectangle id="id1368" rounding="0" shape="0">
                                <e;rectangleBase height="2.561111" width="2.819996" x="2.801096" y="2.47079">
                                  <e;graphicEntity isClipMask="1" shouldFill="0" strokeCapStyle="1" strokeJoinStyle="1" strokeWidth="0.2"/>
                                </e;rectangleBase>
                              </e;rectangle>
                            </e;clipMask>
                          </e;placedFileReference>
                          <r;imageFileReference r;id="id1361"/>
                        </e;image>
              
              

              I had even thought at one point of using mail merge or Excel to generate XML flies for Layout pages. In theory you could right a custom application to create a Layout file, or at least the XML to be used in a file. Hmm, maybe a nice SU ruby script.

              So you can create new content, but also tons of nice things you could do with a find and replace in the text editor. Do all of you arrows look to big? Find endArrowSize="5" and change it to endArrowSize="3"

              --

              David Goldwasser
              OpenStudio Developer
              National Renewable Energy Laboratory

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pout
                last edited by

                David,

                Thx, this seems like a nice path to follow!

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pout
                  last edited by

                  Hey David,

                  Is there any additional information available on the XML structure used?

                  regards

                  1 Reply Last reply Reply Quote 0
                  • DavidBoulderD Offline
                    DavidBoulder
                    last edited by

                    @pout said:

                    Hey David,

                    Is there any additional information available on the XML structure used?

                    regards

                    Sorry, I must have missed this reply, also sorry, I don't have a good source on documentation for this, but if you work on a copy of your files so there is nothing to mess up, you may have good luck searching the text file for an object you have to find how it is referenced in the code.

                    --

                    David Goldwasser
                    OpenStudio Developer
                    National Renewable Energy Laboratory

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement