transform > represent the objects in illustrator via javascript

Hi all

is there a way to transform > reflect the Vertical axis in illustrator, but via JavaScript not apple and I mean does not reflect the scale H or V

Thanks in advance.

Hi Muhammad.eloc,

You can try something like this:

var totalMatrix = app.getScaleMatrix(-100,100);
app.activeDocument.activeLayer.pathItems[0].transform(totalMatrix);

for example the first element of the path in the active layer

Have fun

Tags: Illustrator

Similar Questions

  • How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    R,

    You can do this:

    (1) create the initial direct Type;

    (2) in the appearance palette dialog, click on add a new fill and define the color as you wish;

    (3) effect > convert to shape > Rectangle corners round/Rectangle/Ellipse and set parent > width/extra height as you wish (essentially what needs to be added to the size of the bounding box, if anything).

    After that you can change the Type and the filled area will fit as shown on the picture.

  • Resize the artboard to contain the object in Illustrator CC 2015

    In the past I could easily resize my work plan to fit the dimensions of my art simply by double-clicking the object desired by using the tool of work plan. After the upgrade to 2015 CC, I was sad to find that this feature has been removed. Anyone know if there is a workaround or how I could easily do this without manually adjust the work plan? Like so many things, I notice in CC 2015, this change of bugs completely.

    Thank you!

    Jessica, other,

    Just to make sure, what happens if you disable the GPU performance by clicking on the icon of the rocket in the App bar and deselect the box Performance GPU?

  • To access the built in functions via javascript

    Hello world

    Is there a way to call one of the functions by using javascript? For example, I added a click_box and events on the success, I can choose to continue, go to a different slide, open a file/url, etc. I can also choose to execute a javascript script.

    My question is, is that what I can choose run a javascript script, then inside this javascript, call the 'open file/url' and pass it a variable (url)?

    The reason why I want to do is when a user clicks on a link to open a URL, I want the movie to pause until they come back and click on the next button to continue.

    Unless of course there is a much easier way to achieve this.

    Thank you

    Manny

    Hi Manny

    If you look at the list, you should see that open the file or the URL is among your choices.

    What many seem to miss is that after that, you choose to open in a new window. Here, there is an option that you need to clear so that the project remains paused. Thinking about it, this little always seemed strange to me that he was just interrupted by default. I mean, if you open a new window, you'd think it would mask the Captivate movie. So why would you want the project to continue? But I digress...

    See you soon... Rick

    Useful and practical links

    Begin to learn Captivate 5 times now! $29.95

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcererStone blog

    Captivate eBooks

  • The value of the point of Application via Javascript

    How do you define the value of an element of application using javascript?

    Hello

    I have not tested, but I think $s not work for point of application. He finds only the page elements.
    You can test

    $s(pNd, pValue)
    
    Given a DOM node or string ID (pNd), this function sets the Application Express item value taking into account what type of item it is. The pDisplayValue is optional. If used for a page item of type "Popup LOV" where the attribute "Input Field" = "Not Enterable, Show Display Value and Store Return Value". It will be used to set the "Input Field". The value of pValue will be stored in the hidden return field.
    
    Parameters
    
    pNd (DOM Node | string ID)
    pValue  (String | Array)
    pDisplayValue(String)
    

    BR, Jari

  • Hide the button label Radio via Javascript

    Aloah,

    I have a problem with the cache one option button and label.

    Location:

    I have two groups of Radio with 3 radio buttons.
    Click on a radio button within the first group, I would like to hide the 2 buttons in the second.

    I tried the x_ToggleItem of javascript functions, the x_Hide and the x_ToggleItemRow.
    But all the functions to do the same thing:
    They hide only the button (input type), but not the label (not the Label of the Radio group, but the radio button label).

    So my question is:
    How to hide the button Radio WITH his label?
    Or: How I address the label in JavaScript?

    PS: in the future I will bore you guys more often with questions: P

    MFG,
    Andi

    Hello Andi,

    The problem is that the current implementation of the input element radio group and the label are "separated". There is no common parent (as it should be IMHO).

    But there is... jQuery. Using jQuery you can hide an element with the id and hide the label using the next() method.

    If something like this (where P13_RG1_3 is the 3rd option in a radiogroup):

    $('#P13_RG1_3').hide (); $('#P13_RG1_3').next () .hide ();

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Grey outline around the objects when exporting to Photoshop

    Hello

    I have a strange issue when exporting with a simple badge that I'm working on Illustrator to Photoshop.

    Everything seems well within the Illustrator, but when I select my creation and copy and paste into Photoshop, then as a "dynamic object" or "pixels", I get a strange gray outline around the objects that should be hidden.

    I use the latest versions of Illustrator and Photoshop 2015 CC and their installation on Mac OSX El Capitan v. 10.11.3

    Edit: I noticed that the compression of the screenshots, it is difficult to see, but it should be very obvious if you download AI and try it yourself.

    I link to the file: http://bit.ly/1QhIi6i

    Best regards

    Rasmus

    Skærmbillede 2016-02-26 kl. 10.53.57.png

    Skærmbillede 2016-02-26 kl. 10.54.01.png

    Skærmbillede 2016-02-26 kl. 10.55.06.png

    Skærmbillede 2016-02-26 kl. 10.55.39.png

    I think that the problem is more on the side of Photoshop.

    Rasterize the objects in Illustrator; no visible lines.

    Pixelation in Photoshop; the Ant-aliasing artifacts.

    It is easy to reproduce: put a couple of black oval overlaid. Use Pathfinder > divide

    Now you have perfectly fitting distinct forms.

    Copy and paste into Photoshop; lines.

    Rasterize them (or use the pixelation effect) in Illustrator, copy and paste it into Photoshop. no lines.

  • Hanging in the updating of the IRR via Javascript

    Apex: 4.2.2.00.11

    I have an IRR that has a checkbox column. Checking the box either includes or excludes this specific row when the page is sent.

    I add a 'global' checkbox in the column header of the IRR report for this column. It controls, checks all the boxes in this column to SORT. Unchecking the contrary fact. The "global" checkbox is a toggle power switch of the checkboxes in the SORT.

    So far so good. Works as expected.

    However, during the updating of the IRR (due to changes of order sorting, additional filters added, etc.), it redraws the region of apexir_DATA_PANEL - and with it, he repaints the table headers too. And this removes the "global" checkbox in the column header. (a page refresh is necessary to return to the "global" checkbox)

    I want to do is add a function call to the Manager of refreshment of the IRR - the last call to the handler is the custom function that adds the "global" checkbox in the column header. Something like:

    . Bind $(«#IRR_OBJECT_HERE») ("onchange", function() {}
    AddGlobalToggle(); Added the check box of the column header if there is
    });

    I tried many references to object (unless the IRR) and managers of events, but without success.

    Is it possible to connect refresh report string of the IRR via Javascript?

    Billy

    Requires as not simply a dynamic action after Refresh on the IR region?

  • Ignore the size of a stroke during the transformation of an object

    Why, suddenly, changing the stroke on an object changes the dimensions of the object in the processing window? If I draw a carrΘ, 100 x pt 100 pt with no line, the transformation panel says it's 100 x 100 pt pt. If I add a stroke of 1 pt around the place, Transform said now that the object is 102 x 102 points pt (assuming that I said to draw the line outside of the object).


    Illustrator did not that above all this week. I accidentally changed a parameter? Is this one of the Adobe without end useless 'improvements '?


    I don't want it to do this. I want it to ignore the size of the race when you move an object or view the dimensions of an object.


    P.S. Don't tell me that illustrator always behaved this way. There can be no.


    Particularities: Illustrator Mac OS 10.10.3 CC 2015.


    Thank you.

    You can toggle the option use an extract from the limits in the General preferences or in the drop of the alignment pallet.

  • Illustrator does not resize / move item to a given pixel, return to position size / previous. And also when resize, reduce some element complex, it completely distorts the object.

    Hi guys. I'll have much declined of disorders I've done the last Illustrator update (17.) on my PC. Sometimes works, sometimes not. I think that it is a software bug.

    When I try to resize or move a shape or other element to a given pixel, he returned to the size or the previous position. It won't let me change if a pixel more or less than my desired. I took twice as much time to finish the work, make cuts.

    Moreover, when I resize an objetc, a logo for example, which consists of several elements for a smaller size, the object is completely undetermined. It does not keep the unit and the initial spacing between the elements.

    EXAMPLE 2_1.jpg

    EXAMPLE 2_2.jpg

    Actually,.

    In such cases, the first assumption is aligned to the pixel grid.

    You can select the entire document and untick finally align on the pixel grid in the Transform palette and uncheck also align new objects to the pixel grid in the options of the Launcher.

    You can avoid the types of documents with the default (RGB for the web and other) or change the default value for such documents.

    Apart from this, it may be time to move to an updated version or CC2014 (18.1.1).

    Using the CC Office management application, we can go to the gear icon at the top right and go from there.

  • Setting opacity object via JavaScript

    Hello

    one last thing: I'm trying to adjust the opacity of the object of a framework of text via JavaScript (39%).

    Screen Shot 2012-10-19 at 23.27.25.png

    Unfortunately, I can't find the right code for this (I scanned the Jongware object model viewer but this part seems to be a bit tricky). Any ideas?

    Thanks in advance.

    See you soon

    Solved

    text_frame [i].transparencySettings.blendingSettings.opacity = 39;

  • How to change the "TextVariable" via javascript

    Hello

    How can I change the value of a "Custom text Variable" via javascript in indesign CS5?

    I understand that there is a 'content' that is me allotted property, but I can't understand how to set or change.

    Here's the javascript code example for reference.

    var docRef = app.activeDocument;
    
    
    for ( var i = 0; i < docRef.textVariables.length; i++ ) {
    
    
        var textVariableItem = docRef.textVariables[i];
    
    
              // Check for the type
              if (textVariableItem.variableType === VariableTypes.CUSTOM_TEXT_TYPE){
    
    
                        var variableOption = textVariableItem.variableOptions;
      
                        // This will give me the text value of the variable
                        alert("Text Variable " + i + " \n " + textVariableItem.name + "\n" + variableOption.contents);
    
    
                        // But how do I set it? 
                        // The following does not seem to work 
                        variableOption.contents = "New custom text..."; 
              }
    }
    
    // Logic behind this script
    
    // theScript()
    // is a wrapper function to provide functional scope to the entire script
    // This function is invoked at the very bottom of the file
    
    // main();
    // the main function that gathers the initial parameters and launches the dialog box
    
    // function mainDialog(docRef, selectedItems, layers, inputs)
    // A function that creates a dialog box this function is passed as a parameter to a "factory method"
    // called function sfDialogFactory(dialog)
    // which is a general purpose utility for creating dialog boxes.
    
    // The mainDialog function has a callback function that responds to the "comtinue" button and after some validation
    // makes a call to a function called
    
    // function doAction(docRef, inputs, options)
    // This is where the main behvior of the script is suppose to be defined.
    // it is designed to be called AFTER the dialog box return and is the result of the callback inside mainDialog
    // The doAction function receives objects that are parameter holders for various inputs and options that come from the
    // dialog box presented to the user
    
    function theScript() {
    ///////////////////////////////////////////////////
    // BEGIN THE SCRIPT
    //=================================================
    
    ////////////////////////////////////////////////////////////////////////////////
    // SCRIPT MAIN PROCESS
    ////////////////////////////////////////////////////////////////////////////////
    // Main Process
    // The beginning of the script starts here
    // Add main logic routine to this function
    
    // Call Main Function to get the ball rolling
    var elementsData;
    var theDocument = app.activeDocument;
    var inputGroup;
    main();
    
    function main(){
    var theSelectedItems = theDocument.selection;
    var theLayers = theDocument.layers;
    
        var myDialog = sfDialogFactory(mainDialog(theDocument, theSelectedItems), theLayers);
        var result = myDialog.show();
        if (result == 1){
            newAction();
            alert("Done");
            }
        else{
            alert("Not Done");
            }
    }
    
    ////////////////////////////////////////////////////////////////////////////////
    // SCRIPT SUPPORTING FUNCTIONS
    ////////////////////////////////////////////////////////////////////////////////
    // Supporting Functions
    // Include functions that offer partial functionality
    // These functions are called and acted upon within the mainProcess function
    function newAction(){
    
            var formData = getControlValues(inputGroup);
            var inputs = {};
            var options = {};
           // alert("callback get form data");
          // Do something with formData values here
            var cLen = formData.controls.length;
            var formValues = '';
            for (var c = 0; c < cLen; c++ )
            {
                if (formData.controls[c].name === "inputECONumber") {
                    inputs.inputECONumber = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentName") {
                    inputs.inputDocumentName = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentNumber") {
                    inputs.inputDocumentNumber = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentRevision") {
                    inputs.inputDocumentRevision = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentType") {
                    inputs.inputDocumentType = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
            }//End FOR
        doAction(theDocument, inputs, options);
        }
    
    function mainDialog(docRef, selectedItems, layers, inputs) {
    
    // Main Dialog
    // alert("Main Dialog: " + docRef.name);
    
    if ( docRef === undefined ) {
      alert("Cannot Execute, please select a document.");
    }
    
      var currentData = getMetaData();
    
      var dialogObj = {};
    
      dialogObj.groups = []; // An array of dialog groups
      dialogObj.title = "Update Meta Data";
    
      var groupLabelInfo = {};
      groupLabelInfo.title = "Edit: " + docRef.name;
    
      // Add Elements using JSON shorthand syntax
      groupLabelInfo.elements = [
        {
            "name":"labelECONumber",
            "type":"statictext",
            "value":"Engineering Change Order (ECO) Number",
            "visible":true
        },
        {
            "name":"inputECONumber",
            "type":"edittext",
            "value": currentData.inputECONumber,
            "visible":true
        },
    
        {
            "name":"documentName",
            "type":"statictext",
            "value":"Document Name",
            "visible":true
        },
        {
            "name":"inputDocumentName",
            "type":"edittext",
            "value": currentData.inputDocumentName,
            "visible":true
        },
    
        {
            "name":"documentNumber",
            "type":"statictext",
            "value":"Document Number",
            "visible":true
        },
        {
            "name":"inputDocumentNumber",
            "type":"edittext",
            "value": currentData.inputDocumentNumber,
            "visible":true
        },
    
        {
            "name":"documentRevision",
            "type":"statictext",
            "value":"Revision",
            "visible":true
        },
        {
            "name":"inputDocumentRevision",
            "type":"dropdownlist",
            "value": currentData.listRevisions,
            "visible":true,
            "selection":currentData.selectionRevision,
        },
    
        {
            "name":"documentType",
            "type":"statictext",
            "value":"Label Type",
            "visible":true
        },
        {
            "name":"inputDocumentType",
            "type":"dropdownlist",
            "value": currentData.listDocumentTypes,
            "visible":true,
            "selection":currentData.selectionDocumentType,
        },
    
      ];
    
      // Add to groups to list
      dialogObj.groups.push(groupLabelInfo);
      return dialogObj;
    }
    
    function doAction(docRef, inputs, options) {
    
    alert("doAction " + docRef.name + " \n INPUTS: \n" + inputs.reflect.properties + "\n\n OPTIONS: \n" + options.reflect.properties);
    
    // Get the current contents
    
    var fooContents = app.activeDocument.textVariables.item ('Foo').variableOptions.contents;
    var barContents = app.activeDocument.textVariables.item ('Bar').variableOptions.contents;
    
    alert("GET textVariable contents \n Foo: \n" + fooContents + "\n\n Bar: \n" + barContents);
    
    // Set/Update the contents
    // Why does this not seem to work?
    
    alert("SET textVariable contents \n Foo: \n" + inputs.inputDocumentName + "\n\n Bar: \n" + inputs.inputDocumentType);
    
    app.activeDocument.textVariables.item ('Foo').variableOptions.contents = inputs.inputDocumentName;
    app.activeDocument.textVariables.item ('Bar').variableOptions.contents = inputs.inputDocumentType;
    
    // Script does not seem to reach this point. Why?
    alert("END of doAction");
    }
    
    // A Factory function for creating dialog boxes
    
    function sfDialogFactory(dialog) {
    
        // A factory method for creating dialog screens
    
        // Dialog Window
        var d = new Window("dialog", dialog.title);
    
        // alert("Number of Inputs" + dialog.inputs.length);
        // alert("Number of Options" + dialog.options.length);
    
        var i; // counter
        var len; // length of array elements
    
        // Generate Groups
        if (dialog.groups.length > 0) {
    
            len = dialog.groups.length;
            for (i = 0; i < len; i++ )
            {
                var currentGroup = dialog.groups[i];
                inputGroup = d.add ("panel", undefined, currentGroup.title);
                    inputGroup.alignChildren = ["fill","fill"];
    
                if (currentGroup.elements.length > 0) {
                    // Add Elements
                    var ii;
                    var elemLen = currentGroup.elements.length;
                    for (ii = 0; ii < elemLen; ii++ )
                    {
                        var currentElement = currentGroup.elements[ii];
    
                        var el = inputGroup.add(currentElement.type, undefined, currentElement.value);
    
                        // Additional properties added for future reflection
                        el.elName = currentElement.name;
                        el.elIndex = ii;
    
                        switch(currentElement.type)
                        {
                            case "statictext":
                                el.visible = currentElement.visible;
                            break;
                            case "edittext":
                                el.visible = currentElement.visible;
                            break;
                            case "dropdownlist":
                                el.visible = currentElement.visible;
                                el.selection = currentElement.selection;
                                el.onChange = currentElement.onChange;
                            break;
                            case "checkbox":
                                el.visible = currentElement.visible;
                                el.value = currentElement.value;
                            break;
                            default:
                            throw new Error('Unknown Dialog Element Type [' + currentElement.type + ']');
                        }
    
                    }
                }
            }
        }
    
      // Buttons Group
      var buttonGroup = d.add("group");
      var bOK = buttonGroup.add("button", undefined, "Continue", {name: "ok"});
      var bCANCEL = buttonGroup.add("button", undefined, "Cancel", {name: "cancel"});
    
      return d;
    }
    function getControlValues(set) {
        elementsData = {};
        elementsData.controls = [];
        // TO DO Add more types
    
        var giLen = set.children.length;
        for (var gi = 0; gi < giLen; gi++ )
        {
            var child = set.children[gi];
            // alert(objReflection(child, "none", false));
            // alert(child.type);
            var control = {};
                control.name = child.elName;
                control.index = child.elIndex;
                control.type = child.type;
                control.visible = child.visible;
            switch(child.type)
            {
                case "statictext":
                    control.value = child.text;
                break;
                case "edittext":
                    control.value = child.text;
                break;
                case "dropdownlist":
                    control.value = child.selection.text;
                break;
                case "checkbox":
                    control.value = child.value;
                break;
                default:
                throw new Error('Unknown Dialog Element Type');
            }
            elementsData.controls.push(control);
            // alert(objReflection(control, "none", false));
        }
        return elementsData;
    }
    function getMetaData() {
    // Return a data structure that contains meta data from the document.
    
        var dataObject = {};
    
         // Default arrays
         dataObject.listRevisions = generateRangeOfNumbers ("r", 1, 100);
         dataObject.listDesignComps = generateRangeOfNumbers ("Comp_", 1, 100);
         dataObject.listDocumentTypes = [
                         "Datasheet",
                         "Manual",
                         "Tech Guide",
                         "Other"
                     ];
    
         // Set Sensible Default Values for the UI Form
         if (!dataObject.inputECONumber) {
             dataObject.inputECONumber = "###ECO###";
         }
    
         if (!dataObject.inputDocumentName) {
             dataObject.inputDocumentName = "Document Name";
         }
    
         if (!dataObject.inputDocumentNumber) {
             dataObject.inputDocumentNumber = "048-xxx-30";
         }
    
         if (!dataObject.inputDocumentRevision) {
             dataObject.inputDocumentRevision = "r01";
         }
    
         if (!dataObject.inputDocumentType) {
             dataObject.inputDocumentType = "Datasheet";
         }
    
         return dataObject;
    
    }
    
    function generateRangeOfNumbers (prefix, start, end) {
        // This function generates an array of sequential numbers within a range
        // prefix = string to append to beginning of each element
        // start = the beginning of the range
        // end = the end of the range
        // length = overall number of cycles to loop through, start and end must fall within this value
    
        var output = [];
    
        for ( var i = start; i <= end; i++ )
        {
            if (i < 10) {
                // Add a leading zero
                output.push(prefix + "0" + i);
            }
            else {
                output.push(prefix + i);
            }
        }
    
        return output;
    }
    
    //=================================================
    // END THE SCRIPT
    ///////////////////////////////////////////////////
    }
    
    theScript();
    

    I modified your code shortly. He works for me here. Check it out...

    Thank you

    Green4ever

  • Aligns the control of transformation of an object in photoshop

    I wonder how to get control of the transformation to follow the object after rotation, right now its always in the same sense, see images of the normal way is but I want it like the blue squareCapture.JPG

    Yes, dynamic objects are the way to go. If you want the sheet with a framework encompassing the position of your blue box, you must put this sheet on a separate layer and turn it so that it is placed so that the blue box would be level. Then you can put it in a dynamic object and rotation is back and he will retain the same bounding box when transformed again.

  • How to remove the complex vector illustration of object in indesign?

    I have a background colored with hundreds of little dots made in illustrator. I have grouped together and stuck in object in indesign. Now I regret it and I want to withdraw again - but I can't get hold of it as an image, but have to return every little point by himself. Is it possible to get the whole group illustrator thing or release the object somehow? Or I should just learn that I need to make a file pdf or something in illustrator and paste that into the object?

    Hi hege,.

    It should be possible to select the container framework that you pasted the Group and to access the menu:

    Object / selection / table of contents to select this group and remove it.

    Also by using the layers panel to select the Group stuck to the inside and remove it.
    (InDesign CS5 and above)

    Something else, if it is really an object group, is to select one of the items in the group, then press the ESC key to select the whole group.

    Uwe

  • I'm updating photoshop today and when I drag an object from illustrator to photoshop, the object doesn't turn into a dynamic object why?

    Update photoshop today and when I drag an object from illustrator to photoshop object market not turning into a smart object why?

    OK - think I have this sorted out now.

    When you copy and paste an Illustrator file in Photoshop, you get the dialog box PASTE.

    You can paste as smart object, Pixels, path and shape layer. In the past, you would select depending on what you want (in my case for most Smart Object) and viola - you have your dynamic object. However, in the newly revised version, there is a checkbox in low called "Add to my current library" If this box is checked, it becomes a library file that displays with a 'cloud' icon in the layer. If you uncheck the 'Add to my current library' it won't matter as a regular smart object.

Maybe you are looking for

  • DP decoder quit unexpectedly

    That seems to happen all the time after upgrades. What is the decoder of the RFP, it is necessary and why it ends?

  • conflict of project cRIO

    Hello!!! I want to control a unit by a touch screen or a PC. For this reason, I did a project that you can see in the attachment. The RT_30_3_2009.vi has been deployed as vi to start on the cRIO. When I try to run the LabVIEW PC_26_3_2009 breaks down

  • Outlook express does not recognize my password and I can't receive e mails

    The password that I used for years on my outlook express has recently ceased to accept the password. How do I re register it or get it back because I can't access the e-mail account?

  • Tools to identify the reasons for slow performance of PC

    I want to know if there are tools by which I can identify why my PC takes so long to boot and load applications.

  • Windows Update error Code 80070663

    With the help of Ultimate and can not download patch PowerPoint published yesterday.  Using Office Pro 2007.  Continue to receive the update failed due to the error Code 80070663, Windows Update encountered an unknown error.  Have not been able to fi