19 Replies Latest reply on Mar 20, 2010 10:46 AM by Harron K. Appleman

    How to make 2 objects one as high as the other (1 step) ?

    frogstyling Level 1

      The heighest object must remain. The little object has to become as high as the big one. I need this in an action.

      2objects.JPG

        • 1. Re: How to make 2 objects one as high as the other (1 step) ?
          Joe Paris Level 3

          I'd turn on Smart Guides (Ctrl+U)  and simply drag the edges to the same level as the larger shape.  Rolling over the edges of the larger shape when dragging allows Smart Guides to show you when you are aligned. In an Action?....?

          • 2. Re: How to make 2 objects one as high as the other (1 step) ?
            frogstyling Level 1

            Thanks !

            That  way I know, but I can't use that in an action.

            I can record it and it works, but than the action always use the same % to resize.

            My images (± 1000) all have different heights. I need to add a rectangle that's 102% heigher than the image itself.

            • 3. Re: How to make 2 objects one as high as the other (1 step) ?
              JETalmage Level 6

              1. Select the tall object.

              2. Transform Palette: Select the value in its Height field.

              3. Select the short object.

              4. Transform Palette: Paste into the Height Fileld.

               

              Turn the Proportional chainlink icon on or off according to whether you want to affect just one dimension or both.

               

              JET

              • 4. Re: How to make 2 objects one as high as the other (1 step) ?
                JETalmage Level 6
                function(){return A.apply(null,[this].concat($A(arguments)))}

                My images (± 1000) all have different heights. I need to add a rectangle that's 102% heigher than the image itself.

                 

                What are "images"? (Raster images? Vector graphics? Combinations?)

                 

                Actions can't record alot of things, like copying a value from a dialog field, or making selections of objects that aren't identifiable by some recordable criteria. This would be better done with a Javascript. But you can probably make a workaround Action which:

                 

                1. Copies the current selection.

                2. Paste In Back

                3. Effect>Convert To Shape>Rectangle. Extra Width/Height: 0 (You'll have to use Insert Menu Item to specifiy this step, and will probably have to manually zero out the Extra Width/Height value when the Action runs.)

                4. Object>Transform>TransformEach>102%.

                5. Sets fill and/or stroke as desired.

                 

                JET

                • 5. Re: How to make 2 objects one as high as the other (1 step) ?
                  Wade_Zimmerman Level 6

                  Edited

                   

                  Edited

                   

                  I am sorry I did not read the action part.

                   

                  Never mind. I'll take the movie done.

                  • 6. Re: How to make 2 objects one as high as the other (1 step) ?
                    frogstyling Level 1

                    thanks for your educating movie

                    but I need it in an action

                     

                     

                    From: Wade_Zimmerman

                    Sent: Friday, March 19, 2010 2:57 PM

                    To: Geert Wijns

                    Subject: How to make 2 objects one as high as the other (1 step) ?

                     

                     

                    Turn to snap to point on it should e on by default.

                     

                    You can see it here in this video.

                     

                    http://mysite.verizon.net/wzphoto/Snap.mov

                    • 7. Re: How to make 2 objects one as high as the other (1 step) ?
                      frogstyling Level 1

                      The images are all vector drawings.

                      I made the action with the "insert menu items" like you said. Nice, I didn't know that till now !

                      The Shape Options in Effect>Convert To Shape>Rectangle : has to be done manually.

                      Here I can already set the end-height (+4px) for the rectangle, so I don't need the 102% anymore.

                       

                      I saved the action and opened it in the ExtendScript ToolKit to see if I can change the values for the Shape Options.

                      But that's like Chinese for me !

                      • 8. Re: How to make 2 objects one as high as the other (1 step) ?
                        JETalmage Level 6

                        ExtendScript Toolkit has nothing to do with Actions. It's for script coding. Actions is just Adobe's word for "macro"--a recording/playback mechanism of user interface commands.

                         

                        JET

                        • 9. Re: How to make 2 objects one as high as the other (1 step) ?
                          frogstyling Level 1

                          If I copy the actioncode in ESTK, isn't there a way to use it for javascript ?

                          Than I could change the Shape Options or skip them.

                           

                          Now my action is working, bur it's gonna take a lot of time to do it manually.

                          This is the piece of code from "Convert To Shape" :

                           

                          /event-5 {
                            /internalName (adobe_commandManager)
                            /localizedName [ 16
                             416363657373204d656e75204974656d
                            ]
                            /isOpen 0
                            /isOn 1
                            /hasDialog 0
                            /parameterCount 3
                            /parameter-1 {
                             /key 1769238125
                             /showInPalette -1
                             /type (ustring)
                             /value [ 14
                              4c6976652052656374616e676c65
                             ]
                            }
                            /parameter-2 {
                             /key 1818455661
                             /showInPalette -1
                             /type (ustring)
                             /value [ 35
                              4566666563743a20436f6e7665727420746f2053686170653a2052656374616e
                              676c65
                             ]
                            }
                            /parameter-3 {
                             /key 1668114788
                             /showInPalette -1
                             /type (integer)
                             /value -2130706106
                            }
                          }

                          • 10. Re: How to make 2 objects one as high as the other (1 step) ?
                            Larry G. Schneider Adobe Community Professional & MVP

                            You can always use the Batch command from the Action flyout menu to do folders of files with your action.

                            • 11. Re: How to make 2 objects one as high as the other (1 step) ?
                              JETalmage Level 6

                              If I copy the actioncode in ESTK, isn't there a way to use it for javascript ?

                              Than I could change the Shape Options or skip them.

                               

                              Frog,

                              Script editors like ESTK are glorified text editors. The fact that you can open a text file (an Action file) in ESTK means nothing. You can open it just as easily in Notepad.

                               

                              Nor does ESTK automatically translate something written in one script language into another.

                               

                              Nor is everything that is accessible in Actions accessible via script, nor vice versa. For example, there is no support for applying items directly from the Effects menu in the Javascript model. There is no way for an Action to be told to select the third pathItem's fourth anchorPoint.

                               

                              To do what you describe in Javascript would entail directly creating some paths using the dimensions of the selected objects, not invoking the Convert To Shape Effect.

                               

                              To avoid the dialog problem in the Action already described, first apply the Convert To Shape command to an object using the parameters desired. Create a Graphic Style from that object. In the Action, substitute an application of the Graphic Style in place of the Menu Item that called the Effect.

                               

                              JET

                              • 12. Re: How to make 2 objects one as high as the other (1 step) ?
                                frogstyling Level 1

                                Thanks Jet ! I'am learning a lot from you, very good tips.

                                 

                                function(){return A.apply(null,[this].concat($A(arguments)))}

                                To avoid the dialog problem in the Action already described, first apply the Convert To Shape command to an object using the parameters desired. Create a Graphic Style from that object. In the Action, substitute an application of the Graphic Style in place of the Menu Item that called the Effect.

                                 

                                I fixed that, but a new issue comes with it.

                                How can I save or change the "graphic style" panel, within the "Convert to Shape-style', so it will load when opening excisting .ai's ?

                                I know how to create a startup doc (template), but that's for starting a new .ai from scratch.

                                 

                                Sometimes, the actions skips the "scale" !?

                                 

                                actionpanel.JPG

                                • 13. Re: How to make 2 objects one as high as the other (1 step) ?
                                  Wade_Zimmerman Level 6

                                  Not to interfere but would a template work for you?

                                  • 14. Re: How to make 2 objects one as high as the other (1 step) ?
                                    frogstyling Level 1
                                    function(){return A.apply(null,[this].concat($A(arguments)))}

                                     

                                    I know how to create a startup doc (template), but that's for starting a new .ai from scratch

                                    ... I tought, or isn't it so ?

                                     

                                    I need the "graphic style" (I made) in the panel when opening an existing .ai !

                                    So I thougt to adjust the default Graphic Styles in the presets.

                                    But is this possible ? ... I don't find it !

                                    • 15. Re: How to make 2 objects one as high as the other (1 step) ?
                                      JETalmage Level 6
                                      How can I save or change the "graphic style" panel, within the "Convert to Shape-style', so it will load when opening excisting .ai's ?

                                       

                                      Keep an object to which the Graphic Style is applied on the Clipboard. That is, include steps in the Action which paste an object like that into each document as the Batch Action runs. As the object is Pasted, its Graphic Style comes with it.

                                       

                                      Give the Style a unique name. Also name the object that "carries" the style from one document to the next by putting something in its Notes field (Attributes Palette). That way, you can create an Action step to select it by name if needed.

                                       

                                      JET

                                      • 16. Re: How to make 2 objects one as high as the other (1 step) ?
                                        frogstyling Level 1

                                        I tried it and tried it and ...

                                        I think you might missed something ... the object on the clipboard (with the GS on it) will be replaced by the new object (left image).

                                        This works nice now :

                                        actionpanel.gif

                                         

                                        Now ... when saving for Web (or is exporting a better way ?), Illustrator puts an hyphen between the filename. Photoshop does this too, which is very annoying.

                                        I can't use that because otherwise I have to change all the filenames in the database !

                                        Also "[Converted]" is added, but that's because the .ai's were saved in an older version.

                                        How can I this work around ?

                                         

                                        SaveOptiAs.JPG

                                         

                                        If that issue is solved ... we're done ... hope so !?

                                        • 17. Re: How to make 2 objects one as high as the other (1 step) ?
                                          JETalmage Level 6
                                          I think you might missed something ... the object on the clipboard (with the GS on it) will be replaced by the new object (left image).

                                           

                                          I didn't miss anything. There are several ways to sequence the steps you use. It was not my intent to write the Action for you, since I don't know the specific details of what you are trying to do. I'm just pointing out additional options that you evidently don't know about, which you can use to workaround some of the initially apparent limitations of Actions.

                                           

                                          Now ... when saving for Web (or is exporting a better way ?)

                                           

                                          Again, "better way" depends on the specifics of what you are trying to do. To wit:

                                           

                                          Illustrator puts an hyphen between the filename...I can't use that because otherwise I have to change all the filenames in the database !

                                           

                                          This is the first mention you have made of a database. This is the first mention you have made of the Action having to accommodate multiple versions of Illustrator.

                                           

                                          Again, if I knew exactly what you are starting with, and exactly what you are trying to end up with, I might take an entirely different route.

                                           

                                          For now, It's Saturday, sunny and warm, daylight savings time, and I have some tinkering to do on my sailboat. So for the moment, all I can advise is to do what I have to do: experiment with the possibilities provided by the available options. For example: "Append [Converted]..." is a setting in General prefs. Have you experimented to see if that has a bearing on what you are trying to do?

                                           

                                          Meanwhile, maybe others (located where it's not so inviting outside) can chime in here. ;-)

                                           

                                          JET

                                          • 18. Re: How to make 2 objects one as high as the other (1 step) ?
                                            frogstyling Level 1

                                            I have a sticker-webshop : http://www.frogstyling.be/Asp/Stickers.asp

                                            As you can see all images, products to sell, are black (gif's). My purpose is to show the images in the color a customer is choosing.

                                            Prototype : http://www.frogstyling.be/X_Tests/ColorChoiceCss.asp

                                            So, I have to replace all my existing gif's. They have to be all negatif, transparant rectangles.

                                            It's the background on the webpage that changes colors, so it's like the image gets another color.

                                             

                                            Database is only for the webshop, this has nothing to do with illustrator, except the filenames that have to keep there original names.

                                             

                                            The .ai's are all made for an older version. They were exported as .ai from SignLab, a signprog.

                                             

                                            "daylight savings time" ... isn't that next week ?

                                            • 19. Re: How to make 2 objects one as high as the other (1 step) ?
                                              Harron K. Appleman Level 4

                                              "daylight savings time" ... isn't that next week ?

                                              No.