9 Replies Latest reply on Jun 5, 2012 10:01 AM by Joce Nunes

    Script for Registration Mark

    Joce Nunes

      Hello, I'm Joce nunes and I'm Brazilian, How are Everone?

       

      So, I need to automate my process of color separation in illustrtor, I made a example and put in append in this post, I should like with script put my registration marks in my objects as append image, the registration should stay a 1 cm of top and 1 cm of bellow of drawing, and in center in horizontal, In the registration of bellow put a description text with reference of my drawing, I was thinking, that of description I write during the execution of script.

       

       

      So, I don't know make it, but it will be very important for my work.

       

       

      I know that it's very complicated, if someone can help me, I would be more happy.

       

       

      Thanks everyone,

       

       

      Joce Nunes

       

      Bellow Is a example that I need.

      Script.jpg

        • 1. Re: Script for Registration Mark
          Muppet Mark Level 5

          Sorry bothering me that you have had no response… While I think that this can be scripted I usually leave this to the app and it's export/print options… What are your reasons for requiring a script solution?

          • 2. Re: Script for Registration Mark
            Joce Nunes Level 1

            Thanks for write for me, I need this script, because I setup my page for 90cm width that's the width of my printer, and this file I import some files and make a color separation and put my registration marks manually, because I work with silkscreen for tshirt, and the registration bar that exist in menu export print is can't help me, and how I need to print some files when I will put this registration the manually I lose a lot of time. I thought if I select my files and execute the script it were more easy.

             

             

            I don't know if I can explain.

             

            Thanks

             

            Joce

            • 3. Re: Script for Registration Mark
              Natesroom1 Level 1

              What im guessing is you have different artboards correct? and you would like to place the marks in the same place every time on every file?

               

              Why dont you make a symbol of the marks, and then the script that someone would make would tell it which symbol to use and that way i think the script may be easier to make rather then a dialog box telling you to choose a file... ya?

              • 4. Re: Script for Registration Mark
                Muppet Mark Level 5

                I don't think there is any issue with finding the bounds of your art and calculating your the position of registration… It looks to be a simple-ish group to construct… The other option I can think of is creating a symbol in your defaults… but that may only be available to new documents… If you struggle to explain then more screen shots or links to *.ai files can help…

                • 5. Re: Script for Registration Mark
                  Natesroom1 Level 1

                  So mark could you write a script that Finds the bounds (wherever he wants) and then have him input the name of whatever the symbol name he has in his palette to be used? If he could enter that name in the script so it would be fully automated would be even better.

                  • 6. Re: Script for Registration Mark
                    Joce Nunes Level 1

                    Hii, I import some files into the same artboard,and I make a color separation,  but sure that the registration can be a symbol and when I excute the script it put the registration in my drawing,

                     

                     

                    I attached an image.

                     

                    Captura de tela 2012-06-04 às 14.37.06.jpg

                     

                    Download the Illustrator file:

                     

                    http://www.sendspace.com/file/9rqq4z

                    • 7. Re: Script for Registration Mark
                      Joce Nunes Level 1

                      The description I need was the filename, this entries I write manually when prompted by script.

                      • 8. Re: Script for Registration Mark
                        Muppet Mark Level 5

                        Well I had a play with this and came up with this to make the registrer ( from your art )… No need for it to be in symbols already now… To add to this now I would need to know more info about your groups and where they come from ( how you add them to the doc )…

                         

                        #target Illustrator
                        
                        app.coordinateSystem = CoordinateSystem.ARTBOARDCOORDINATESYSTEM;
                        
                        var doc = app.activeDocument;
                        
                        doc.defaultFilled = true;
                        doc.defaultStroked = false;
                        
                        doc.defaultFillColor = doc.swatches.getByName( '[Registration]' ).color;
                        
                        var reg = [[({leftD:[15.66015625, -11.8984375], rightD:[20.349609375, -11.458984375], anchor:[20.349609375, -11.458984375]}),
                        ({leftD:[20.349609375, -20.3515625], rightD:[20.349609375, -20.3515625], anchor:[20.349609375, -20.3515625]}),
                        ({leftD:[11.458984375, -20.3515625], rightD:[11.8984375, -15.6591796875], anchor:[11.458984375, -20.3515625]})],
                        
                        [({leftD:[26.859375, -30.626953125], rightD:[22.169921875, -31.064453125], anchor:[22.169921875, -31.064453125]}),
                        ({leftD:[22.169921875, -22.1748046875], rightD:[22.169921875, -22.1748046875], anchor:[22.169921875, -22.1748046875]}),
                        ({leftD:[31.06640625, -22.171875], rightD:[30.62109375, -26.8642578125], anchor:[31.06640625, -22.171875]})],
                        
                        [({leftD:[32.890625, -20.3515625], rightD:[32.451171875, -14.64453125], anchor:[32.890625, -20.3515625]}),
                        ({leftD:[27.880859375, -10.07421875], rightD:[22.169921875, -9.6318359375], anchor:[22.169921875, -9.6318359375]}),
                        ({leftD:[22.169921875, 0], rightD:[22.169921875, 0], anchor:[22.169921875, 0]}),
                        ({leftD:[20.349609375, 0], rightD:[20.349609375, 0], anchor:[20.349609375, 0]}),
                        ({leftD:[20.349609375, -9.634765625], rightD:[14.64453125, -10.0771484375], anchor:[20.349609375, -9.634765625]}),
                        ({leftD:[10.076171875, -14.646484375], rightD:[9.6328125, -20.3515625], anchor:[9.6328125, -20.3515625]}),
                        ({leftD:[0, -20.3515625], rightD:[0, -20.3515625], anchor:[0, -20.3515625]}),
                        ({leftD:[0, -22.171875], rightD:[0, -22.171875], anchor:[0, -22.171875]}),
                        ({leftD:[9.6328125, -22.171875], rightD:[10.076171875, -27.87890625], anchor:[9.6328125, -22.171875]}),
                        ({leftD:[14.64453125, -32.44921875], rightD:[20.349609375, -32.888671875], anchor:[20.349609375, -32.888671875]}),
                        ({leftD:[20.349609375, -42.517578125], rightD:[20.349609375, -42.517578125], anchor:[20.349609375, -42.517578125]}),
                        ({leftD:[22.169921875, -42.525390625], rightD:[22.169921875, -42.525390625], anchor:[22.169921875, -42.525390625]}),
                        ({leftD:[22.169921875, -32.888671875], rightD:[27.880859375, -32.447265625], anchor:[22.169921875, -32.888671875]}),
                        ({leftD:[32.451171875, -27.876953125], rightD:[32.890625, -22.171875], anchor:[32.890625, -22.171875]}),
                        ({leftD:[42.51953125, -22.1748046875], rightD:[42.51953125, -22.1748046875], anchor:[42.51953125, -22.1748046875]}),
                        ({leftD:[42.51953125, -20.3515625], rightD:[42.51953125, -20.3515625], anchor:[42.51953125, -20.3515625]})]];
                        
                        var cp = doc.compoundPathItems.add();
                        
                        for ( var i = 0; i < reg.length; i++ ) {
                          
                                  var p = cp.pathItems.add();
                          
                                  for ( var j = 0; j < reg[i].length; j++ ) {
                          
                                            pp = p.pathPoints.add();
                        
                                            pp.anchor = reg[i][j].anchor;
                                            pp.leftDirection = reg[i][j].leftD;
                                            pp.rightDirection = reg[i][j].rightD;
                        
                                  };
                        
                                  p.closed = true;
                        
                        };
                        
                        var regSym = doc.symbols.add( cp, SymbolRegistrationPoint.SYMBOLCENTERPOINT );
                        
                        regSym.name = 'Registration';
                        
                        cp.remove();
                        

                         

                        Let me know if this symbol is useable? ( should be )

                        • 9. Re: Script for Registration Mark
                          Joce Nunes Level 1

                          Hi, Bellow the link  a video of How I did the colors separation of the my files: