Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Set Values for AE Infographic Comps with Templater

    Scheduled Pinned Locked Moved
    Templates
    5
    12
    1.5k
    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.
    • Ben Formanundefined
      Ben Forman
      last edited by

      I’ve been tinkering around with this popular graph builder on Envato: https://videohive.net/item/infographic-maker/20030912

      In order to set the value of the graph, I’m currently hand pecking in percentages (e.g. I’m typing “25” if I want the graph to say 25).

      These are set in the “Essential Properties” menu under “Value Settings.”

      Is there any way that these values could be driven by Templater? What would that require?

      1 Reply Last reply Reply Quote 0
      • ariestavundefined
        ariestav
        last edited by

        Hi @Ben-Forman!

        While I personally have not used Essential Graphics panel with Templater, you should be able to do this by using some kind of numerical expression control that you can add to Essential Graphics. That expression control can be driven by data read by Templater from your data source.

        Have you had an opportunity to read this article in our knowledge base about using Templater data in expressions?

        Does this help? Would love to learn about the results you get.

        Ben Formanundefined 1 Reply Last reply Reply Quote 0
        • Ben Formanundefined
          Ben Forman @ariestav
          last edited by

          @ariestav at a high level this makes sense but I’m getting lost pretty quickly when trying to implement.

          Is there a video tutorial?

          ariestavundefined 1 Reply Last reply Reply Quote 0
          • ariestavundefined
            ariestav @Ben Forman
            last edited by

            @Ben-Forman Unfortunately, we don’t have a video tutorial on this, but we do have plans to produce more this year.

            My suggestion is to create a simple project with one layer that has an expression which uses data Templater is reading, and see how you can push that technique from there.

            Our support team can help you along the way — the documentation does outline how to get data from Templater into an expression. Also, please check out some very rudimentary pre-rigged projects in our GitHub repository (you can download them) and inspect the layers that have expression enabled. I think you will gain insight into how it can be implemented. In particular, check out the drive-test-color project folder which shows how you can use Templater data to drive color of text.

            1 Reply Last reply Reply Quote 0
            • Ben Formanundefined
              Ben Forman
              last edited by

              I’ll take a look at those.

              In this article there are code snippets for pieces of the expressions. What would the full expression codings be?

              Secure Login
              1 Reply Last reply Reply Quote 0
              • Jeffundefined
                Jeff
                last edited by

                Ben,

                I’ve been doing some testing with the Essential Graphics panel and how it interacts with Templater, and while I think you can use Templater to set the graph variables, you’ll most likely have to do it in the timeline directly.

                If you right-click on the value that you want to change in the Essential Graphics panel and choose “Reveal in Timeline” that should display the value in the project that is controlling the graph size. Once you know the location of that value, you should be able to get more direct access to changing it.

                First, you’d want to add a text object to the project and apply Templater to it. This will be the value you’ll change in the graph setting, so 25, 70, etc. Next, you’ll want to customize the Expression in the field we found earlier by clicking on the value while holding the Alt or Options key.

                Once you’ve got access to that line, you’ll want to add a reference to the variable you brought in previously. In a test, I used something like:

                parseInt(thisComp.layer("<variable layer name>").text.sourceText)
                

                This replaces the value in that layer with the number that was brought in earlier. It’s a bit tricky, but those are the basics of using Templater to designate a variable in a project. It’s hard to give specific instructions without direct access to the file, but hopefully, that should get you started. If you have any other questions, please just let us know.

                One final note. Once an expression is controlling the layer, you’ll no longer be able to change the value using the Essential Graphics panel.

                Ben Formanundefined 1 Reply Last reply Reply Quote 0
                • Ben Formanundefined
                  Ben Forman @Jeff
                  last edited by

                  @Jeff it’s working! Thanks!

                  1 Reply Last reply Reply Quote 0
                  • Ben Formanundefined
                    Ben Forman
                    last edited by

                    Arie and Jeff,

                    Can I do this to call in complete comps ?? Or is there another way to call in complete comps from the same AEP?

                    1 Reply Last reply Reply Quote 1
                    • ariestavundefined
                      ariestav
                      last edited by

                      Yes, in the data source, when you want to use an existing composition, write the comp name in the cell and wrap double braces around it.

                      Let say you have some animated pre comps of icons in the AEP. Maybe three comps named, “icon-email”, “icon-finish”, and “icon-web”. To reference them for a dynamic pre-comp layer, in the data source you would write their names in the cell, but with double braces. So in the data source, you would reference them like {{icon-email}}, {{icon-finish}}, {{icon-web}}.

                      We call these flags, and they are documented here:

                      Let us know if this helps!

                      1 Reply Last reply Reply Quote 0
                      • Ben Formanundefined
                        Ben Forman
                        last edited by

                        Wow - can’t wait to try this!

                        1 Reply Last reply Reply Quote 1
                        • Ben Forman 0undefined
                          Ben Forman 0
                          last edited by

                          Can you remind me the syntax to do this with HEX color codes properly?

                          Jeffundefined 1 Reply Last reply Reply Quote 0
                          • Jeffundefined
                            Jeff @Ben Forman 0
                            last edited by

                            @ben-forman-0

                            Sure! You can use a few different Expressions, but the basics are relatively similar.

                            For solids, the mapping is automatic, so you can apply Templater to a solid and then directly input the hex code you’d like to use in the data source. For other layers, the process is a bit more complex. First, you’ll want to create a text layer with the Templater Effect applied and map it to your data source. For the purposes of this example, we’ll call that layer “color” (with no quotes).

                            Next, you’ll want to add the “Fill” effect to the layer whose color you want to change. Finally, you’ll want alt/option click the “Color” value of the “Fill” effect and add this expression:

                            hexToRgb(""+thisComp.layer("color").text.sourceText+"")
                            

                            This should change the value of the “Fill” effect to the hex code brought into the “color” text layer.

                            Hopefully, that’s enough to get you started, but if you have any issues or additional questions, feel free to let us know.

                            Thanks!

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post