Copy item style attributes/properties to other item?

Just want to ask if someone know if there is short way to copy item properties to other object, than go through every possibilities with script. There is quite many possibilities with strokes and so on, so this could be helpful...
I mean like with "Eyedropper Tool", but with the script
I can set them manually like below. But just want to know is there already some "shortcut" way to handle this kind object style copying?
var doc = app.activeDocument;
var selectedItems = doc.selection;
var newLayer = doc.layers.add();
var ellipse = newLayer.pathItems.ellipse(100, 0, 100.0, 100.0, false, true );
ellipse.fillColor = selectedItems[0].fillColor;
ellipse.strokeColor = selectedItems[0].strokeColor;
ellipse.strokeWidth = selectedItems[0].strokeWidth;
ellipse.strokeDashes = selectedItems[0].strokeDashes;
ellipse.strokeDashOffset = selectedItems[0].strokeDashOffset;
// etc etc...

You can make an object to store attributes you want to copy from some art item and then use that object as data for a function which takes another art item as an argument and applies all appropriate options from the data object.
My sample code here relies on having 2 path items with names of 'mySource' and 'myDest'  .
The appStyle object acts as a clipboard to hold the style attributes of the art, and uses the for-in loops to apply and copy them, which means if AI art objects had a 'copyStyle' or 'applyStyle' properties, it would mess you up, then the names would need to change to be unique.
#target illustrator
function test(){
    var doc= app.activeDocument;
    var appStyle = {
         fillColor: null,
         strokeColor: null,
         strokeWidth: null,
         strokeDashes: null,
         strokeDashOffset: null,
         copyStyle: function(sourceArt){
            var a = sourceArt;
            for(var all in this){
                if(a.hasOwnProperty(all)){
                    this[all] = a[all];
        applyStyle: function(destArt){
          var b = destArt;
            for(var all in this){
                if(b.hasOwnProperty(all) && this[all] != null){
                    b[all] = this[all];
    var mySourcePath = doc.pathItems.getByName('mySource');
    var myDestPath = doc.pathItems.getByName('myDest');
    appStyle.copyStyle(mySourcePath);
    appStyle.applyStyle(myDestPath);
test();

Similar Messages

  • Copy / Paste Styles between objects?

    Can you copy/paste styles between different objects in Motion 5?
    I know I can save a Style as a name and then select it from the style list. It would be great to just copy a style and then select another object and paste. Can you do this?
    Thanks!
    Scot

    Motion lets you drag and drop parameters on different things. If the action is "not allowed" you won't be able to do it. That said, if you have a rectangle located somewhere on the screen and you want to line up text over the rectangle, just drag the Position parameter of the rectangle onto the text layer in the layers list.
    For "like" objects, for instance: shapes, you can drag the Outline and Fill panels (the entire panel!) onto another shape and all of the contained parameters will be copied over. So, if you have a red outlined (say 10 px wide), blue filled rectangle, and you want the same properties on a circle, just drag those panes (click on "Fill" And "Outline") onto the circle.
    If all you want to do is save styles of shapes, or text, that you've created, then for shapes, on the Style inspector theres a Shape Style dropdown at the top of the parameters list. Click that and Save Shape Style. Whatever your current settings are, they can be saved and reselected from that menu.  For text, at the top of the Style inspector, you'll generally see Normal (in whatever that layers font is.) Click on that bar and select Save All Basic + Style Attributes.
    HTH

  • Create item copy other item (not template)

    Hi experts,
    I have a question related to PPM 5.0, is it possible create an item with copy other item? ( no copy for a template)? I have no the way to do it.
    Thanks a lot,
    Sara

    Can you paste a screenshot of the Personalization page ?
    Did you select the 'Complete' radio button option ?
    Cheers
    AJ

  • Copy Sales Order item  texts completely  to other item in same sales order

    Hi;
    I need to know how we can copy item level text to other item texts in same sales order. We are maintaining most of data may duplicate but not always. So I need to copy the the earlier text & paste in item created newly.
    Pl. answer.
    Thanks ;
    avinash

    Did you get answer for this query? I have a same situation and wondering if you already have a solution
    thanks

  • How can I display the last items of a region from other Oracle Portal page?

    I want to display de last five items (f.e.) included in a region (with attributes created) from other page. I've tried using custom search, but it also shows the attribute names, and I want show the attribute values (I don´t know how can I format these attributes).
    Thanks a lot.

    create a stored procedure (f.e. in schema myschema create a stored proc named renderAsHTML)
    code for the procedure :
    PROCEDURE renderAsHTML(p_itemId varchar2,p_pageId varchar2,p_siteId varchar2) IS
        l_displayName  portal.wwsbr_all_items.display_name%type;
        l_name         portal.wwsbr_all_items.name%type;
        l_publishDate  varchar2(10);
        l_url varchar2(250);
    BEGIN
         -- Looking for item datas
         select display_name, name,   to_char(publish_date,'dd/mm/yyyy')
         into l_displayName,l_name, l_publishDate
         from portal.wwsbr_all_items
         where id =p_itemId and language=portal.wwctx_api.get_nls_language;
         -- getting the URL og the item
         l_url := portal.wwpob_page_util.get_page_url(p_pageId, p_siteId);
         -- HTML rendering
    htp.p('<.a href="'||l_url ||'/'|| l_name ||'">' ||  l_displayName ||'</.a><.br/>');
    htp.p('Published on ' || l_publishDate ');
    EXCEPTION
        WHEN others THEN
               htp.p('<.div>Somme error occured , code is ' || SQLCODE || '.</.div>');
    END renderAsHTML;
    please notice that I've added a dot in HTML tags to avoid this forum to interpret them
    note : make sure that you granted "execute" for the public user on teh procedure you've just created.
    go to item properties (navigator>shared objects>item types>modify the one you want
    go to tab3 (procedures)
    set the following options :
    type : PL/SQL
    call proc : myschema.renderAsHTML
    link text : render as HTML
    icon : keep blank
    select the "display proc results with the item" option
    pass the following parameters :
    attribute1 : item ID as p_itemId
    attribute1 : page ID as p_pageId
    attribute1 : pagegroup as p_siteId
    Now, in your custom search portlet, go to results rendering, remove all attributes and add the "associated function" attribute.
    Now, all the HTML generated by the stored proc will be rendered instead of the item.

  • BI 7 properties of web item to change background,...

    Hi,
    I try to find how to change the background color or no backgoround color of web item (for example text element) in BI 7
    I don't find any properties as in previous version like background color,...
    Do you know how can i manage it except in CSS style.
    Thanks
    Cyril

    Hi,
    You can always write HTML tags for a web item and assign properties to that object within that tag.
    For example if you have put your web items in a table structure. You can change the background of the cell in which the item is placed.
    For eg:
    <html>
    <body>
    <table>
    </table>
    <tr>
    <td bgcolor="#30688" width="80%">
    Place your web item here
    </td>
    </tr>
    </body>
    </html>
    Regards,
    Kishore

  • Error-Cannot set DISPLAYED attribute of the current item DUMMY.VIEW

    HI ALL,
    Im my form, I have three BLOCKS
    1) CTL(Manual Data Block)
    2) DUMMY(Manual Data Block)
    ITEMS 1) msg 2) <view> 3) <cancel> 4) <Exit>
    3) Audit Trial Log(Database Data Block)
    ITEMS All Database columns of a table Audit_Trial_Log
    CANVASES 1) CANVAS3------Block CTL---window1
    2) New_Entries---Blocks Dummy and Audit Trial Log--New_Entries
    In CTL block I have button <VIEW>. On when-Button-Pressed trigger I am setting "VISIBLE' properties false for items of datablock AUDIT Trail LOG and also for item of datablock DUMMY excluding for <VIEW> and <Cancel> buttons.
    when-Button-Pressed trigger of <View>, I have done reverse setting i.e. previously visible items to invisible and vice versa. Also I am executing query on Audit Trial Log block. But when I click <VIEW> I get the following error
    FRM-41016: Cannot set DISPLAYED attribute of the current item DUMMY.VIEW Even execute query fails.
    Please help me......

    before setting a current item to invisible you must navigate to another item, which is visible

  • Combo/List Box Item List in Properties

    Im creating a form in Acrobat.  Used a list box instead of combo box.  But need to change to combo box.  I already entered in all the items for the list.  I don't want to spend too much time on this.  Is there a way to copy the list from properties on the list box and past into the new combo box?

    You can use Acrobat JavaScript to convert the current items, getItemAt,
    in the list box/combo box to an array or list that could be edited in array definition, edit that list and then use JavaScript, setItems, to use that array to populate the field.

  • Link item style using personalization

    We have a requirement using personalization
    I want to create a link item style using personalization.
    but when i go to personalize page and click on create child icon i can create only some of the widgets.
    Is there any way to create a link bean using personalization?
    Can anybody throw some points on this?

    I remember we removed it for some technical issues(earlier I think it was exposing the fireAction property) and added it back in RUP4 without those properties.
    You have two good solutions to this in CU2 if you are not going to move to the latest.
    1. Use a button instead which has a target frame property which will launch you page in a new window.
    2. Use jdeveloper create a stackLayout and add a link inside that and set the properties required. Deploy that region in MDS, now use personalization to add a stacklayout(good thing for you is this feature of adding regions was introduced in CU2) and set the extends property pointing to the region you deployed and live happily ever after :).
    We have a nice release notes which tells about features added, features removed. You should be utilising that to understand the restrictions on a particular release and the new features too, it's very short and sweet and you can go back to personalization or dev guide to know more about the feature.
    Message was edited by:
    Ramkumar Sekar

  • HOW TO CHANGE LENGTH ATTRIBUTE OF AN STANDARD ITEM?

    we need to set appropiate "display" lenght to an item (VO attribute) in a standard OAF page.This item has maximum length=30 but length (to display)=25 . This is not acceptable for our customers because they can't see the complete value of the item
    To see the item (Project Name):
    Project Manager resp.--> Project List
    Choose a Project.
    CLick on Setup Page
    There, it appears project information. One of the items is Project Name (Name).
    As I said before, this item has maximun length =30 but displays only 25 characteres wide in the "box". Most of items have the same number in both of their properties, but not this.
    How could we change it?
    (of course respecting standards)
    Page is : BasicInformationPG.xml
    it is in /oracle/apps/pa/project/webui
    I'm trying to see where to modify the attribute length while I'm extending the VO.
    I mean:
    I create in JDeveloper a VO (ProjectBasicInfoVO) extending the original.
    I edit VO and go to Attributes... and I see that "Type" property for "Name" attribute is VARCHAR2(30). But.. 30 is not the number of characters we can see in the screen... so How could I change the "length" property of "Name" attribute while extending the VO?
    Please, provide detailed steps. Sorry, I don't see so easy as you say ...

    OAF questions should go into the OAF forum.
    In general you can use the UI control hints for the attribute to set its display width.

  • Discount applied by Item Group Or Properties

    Is it possible to apply different discount percentage prices relating to item group or item properties, to a BP group or BP properties. Eg: BP Group 1 has 10% for Item Group 3 and 15% for Item Group 4. BP Group 3 has 12% for item group 3 and 17% for item group 3.

    Dear Tim,
    As experts are saying...you may check this once...
    Go to Inventory->Price Lists->Special Prices for Business Partners
    1. Select a BP code and item code (Give discount after selecting price list) there
    2. go to ->Copy Discounts (right hand side bottom) . Here you can select the BP groups (and properties also) as per your
    need.
    3. Then go to -> Add Items  (middle bottom). Here you can select the group and properties for items as per your need.
    Thus, your given discount in step1 will be copied.
    Regards,
    RS

  • Need detailed procedure on how to add an item with Item Style Check Box in

    Need detailed procedure on how to add an item with Item Style Check Box in Framework.

    The view instance should be the same as the view instance (view object) specified for your region.
    If the View Attribute already that you need already exists in the View Object then you can use it.
    Otherwise you have to extend the View Object and add the new attribute to it.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Moving one item in timeline moves keyframes on other items!

    a new Title project.
    I have 4 title/text items in a group, in staggered formation in the timeline.
    -- group
    -- item 1
    -- -- item 2
    -- -- -- item 3
    -- -- -- -- item 4
    I'm setting text style keyframes for each of the items; eg, Opacity, to fade in/out.
    I'm very careful to select only the one item in the timeline that I want to work with.
    I then move the playhead to the timepoint I wish to work with, add a new keyframe for the properties I'm dealing with, and change the properties.
    but after doing this for all 4 items, moving any one of the items along the timeline moves not only that item's keyframes but also keyframes from other items, even ones outside of the group.
    is there a linking function that I'm unaware of?
    or is this a bug?
    or...
    any ideas?
    Motion 5.0.7
    OS X 10.9

    I just finished my first Title project, and I'm very pleased with the result.
    I'm even more thrilled that after bringing it into FCPX as a Title, I can transform/scale/move elements around to suit the resolution/parameters of the project I'm working on. it works GREAT!
    very happy, despite the hiccups earlier on.
    moving the objects via the Mini-timeline definitely solved the keyframe problem for me.
    cheers,
    Gregory

  • Personalizations with Create Item and Item Style "Pop Up"?

    Can anyone provide me an example of how to create a simple pop up message?  I would attempt to create this with Oracle Personalizations -> Create Item -> Item Style "Pop Up".
    I attempted to create the pop up message but am not successful.
    Any guidenace would be greatly appreciated.
    Thanks!

    Hi Timo,
    My question is related to personalizations in Oracle Self Service pages,  Currently I am on Oracle APPS R.12.1.3.
    The Self Service pages are associated to a VIEW OBJECT that is either copied from Oracle seeded VOs or created and/or modified in JAVA.
    You can also perform a "Personalization" within the form and by pass making updates in JAVA.  This option is available in any self-service screen, top right corner labeled "Personalize Page".  Once you select "Personalize Page, there is a option called "Create Item" that will allow you to create a new column or custom action.
    My request is simply to understand how to utilize the seeded "Create Item" and within this function "Pop Up" in order for a page or message to appear immediately after for example the user select a button or enters data into a field. 
    Not sure if I can perform this within a "Personlization" or is updating the underlining View Object or Controller class is required.
    Thank you and I appreciate any guidance you can provide.
    Robert

  • Check box item visual attributes

    Hi,
    I set an item visual attributes like below
    background color gray15
    Font weight demibold
    Font style Plain
    Font spacing Dense
    But when executing the form this check box item does not appear clearly, it is not readable, could you suggest me some visual attributes setting to make a check box item more readable?
    Thanks you very much.

    I think the problem is related to enabled of set_item_property of this item when it is set to property_false, the enabled property_false does not allow the visual attributes setting to display the item more readable, do you have any idea to display the item more readable when enabled is set to property_false?
    Thank you very much for your suggestions.

Maybe you are looking for

  • Help? PSE 9 - was a full version, now the serial on my adobe account is registered as "Beta"?

    Hi, I have a bit of a frustrating situation - I received a full copy of Photoshop Elements 9 (for Mac) with a printer 2 years ago, installed it and used it on and off without problem for a year or so. Brilliant. Earlier this year, running out of disk

  • I can't access my images!!!

    Greetings First I thought it might be an error in my code but upon executing the following code that calculates the images's height and width it returns -1 values? the test.jpg exists in the same folder as the ImageXY.java file and it's size is 100 *

  • Unable to open InfoPath forms with large attachments in browser

    We have been running a infopath solution on SharePoint 2010 for a couple of years now. The form is rendered in the browser, but when the attachments are large in size (seems like a ~10MB limit for the form), the system would not allow the user to edi

  • My Black berry Getting Hot

    Hi Dears,  my blackberry Porsche Design P'9882 getting very hot everytime i use it after 1 minuts  specially when i use viber or whatsapp... Device SN =**Removed** Please advise will be appriciated Regards, Zhalla  Edit: SN, Last Name removed. At no

  • Reg Function Module to Date Calculation

    Hi, Could anybody assist me, My requirement is to determine delay of delivery date is equal to (goods receipt posting date u2013 planned delivery date).Is there any function module to find out the dated diffrence. The difference should be '+' or '-'