(javascript) I want to group in existing pathitem

<ai cs5><javascript>
I creat 5 pathitem in the K_layer, i want to group them.
code:
        var myDoc =  app.activeDocument;       
        var K_layer = myDoc.layers.add();
        var k01 = K_layer.pathItems.add();  k01.name='01';
        var k02 = K_layer.pathItems.add();  k02.name='02';
        var k03 = K_layer.pathItems.add();   k03.name='03';
        var k04 = K_layer.pathItems.add();  k04.name='04';
        var k05 = K_layer.pathItems.add();  k05.name='05';
        var mygroup = K_layer.groupItems.add();
        for (var i=0; i<K_layer.pathItems.length; i++)
                K_layer.pathItems[i].move(mygroup, ElementPlacement.PLACEATEND);
result:
     just 01,03,05 into the mygroup, 02,04 still in K_layer.
     I don't know why ?
1.    I try K_layer.pathItems.length=5 is correct
2.    and also i try
     K_layer.pathItems[0].move(mygroup, ElementPlacement.PLACEATEND);
     K_layer.pathItems[1].move(mygroup, ElementPlacement.PLACEATEND);
     K_layer.pathItems[2].move(mygroup, ElementPlacement.PLACEATEND);
     K_layer.pathItems[3].move(mygroup, ElementPlacement.PLACEATEND);
     K_layer.pathItems[4].move(mygroup, ElementPlacement.PLACEATEND);
     stop in the pathItems[3] and show 「error 1302 no such element」
anybody to help, thx~

result:
     just 01,03,05 into the mygroup, 02,04 still in K_layer.
     I don't know why ?
when you remove k01 to move it into the group, all other rearrange their indexes, so k02 becomes pathItem[0] hence, in the next run, it gets skipped since your moving pathItem[1] (k03 at this point).
do it like this
var myDoc =  app.activeDocument;      
var K_layer = myDoc.layers.add();
var mygroup = K_layer.groupItems.add();
var k01 = mygroup.pathItems.add();  k01.name='01';
var k02 = mygroup.pathItems.add();  k02.name='02';
var k03 = mygroup.pathItems.add();   k03.name='03';
var k04 = mygroup.pathItems.add();  k04.name='04';
var k05 = mygroup.pathItems.add();  k05.name='05';

Similar Messages

  • I have photos I want to group together in one album, but can't do this because some may have the same number. How can I combine them all into one album?

    I have photos I want to group together in one album, but can't do this because some may have the same number. How can I combine them all into one album? I was trying to move several albums onto a USB drive and it stated all other files exist at this location.  They are pictures taken at different times and have the same number I guess.

    In iPhoto albums may contain photos with the same file name - iPhoto handles that just fine
    If you are exporting them to move somewhere else use the sequential file name feature of export to give each file a unique name
    LN

  • ActivationException: group already exists

    I'm trying to clean up after setting up an activation group and binding.
    The only APIs available are on the ActivationSystem for unregisterGroup() and unregisterObject().
    Thus, I have used both of these methods in the clean up process, but I am still getting the ActivationException when I try to register the ActivationGroup again.
    The reason for wanting to clean up after activation and binding, is because I'm writing JUnit tests and I want to setup and tear-down the RMI Activation for each test case.
    Exception :-
    java.rmi.activation.ActivationException: group already exists
         at java.rmi.activation.ActivationGroup.createGroup(ActivationGroup.java:272)

    Calling a method on the object. If the object's group isn't running RMID will cause it to run; if the object isn't running in the group the group will cause it to run. This is what activation is actually. Calling the method first communicates with RMID to ensure that everything is up.
    EJP

  • HT204053 i want to change an existing icloud account to a new icloud account?

    I want to change an existing icloud account to a new icloud account

    If you want to create a new iCloud account and migrate your data to the new account, you'll have to delete the existing account, create the new account with a new ID, and then migrate your data to the new account.
    Before doing this, if you have any photos in photo stream that are not in your camera roll or backed up somewhere else save these to your camera roll or you will lose them.  To do this, open the my photo stream album, tap Edit, tap all the photos you want to save, tap Share, then tap Save to Camera Roll.
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account. When prompted about what to do with the iCloud data, be sure to select Keep On iPhone.  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.

  • HT1515 I want to extend my existing wireless router upstairs to my new smart TV.  I have loaded the AirPort Express onto my desktop Mac.  In simple terms do I now just plug the AirPort into a socket halfway between the base WiFi and the Smart TV, or do I

    I want to extend my existing wireless router by using the AirPort Express for my Smart TV.  Can I just plug in the AirPort halfway between the router and the Smart TV and have no direct connection to a computer or the TV, or do I need to plug in next to the TV and somehow connect the AirPort to the TV (ethernet)?

    You are asking several different questions. If you need to store your photos, music, and movies on an external volume, you certainly can. Any externally connected hard disk drive will work, connected either directly to your Mac or to your Time Capsule as a shared volume.
    You should not rely upon using that as a backup device though. Although you certainly may use it for both purposes, it is a better idea to have dedicated backup devices for a variety of reasons not limited to redundancy. You would not want to simultaneously lose all your pictures as well as your backup. If they are all on the same device, that could happen. Furthermore, a backup cannot back up the volume on which it is running.
    As for adding an Extreme or Express, using its LAN port for your iMac, and then enable Internet sharing so you can effectively use the iMac as a "hotspot", you can do that too, but I am unclear on what benefit you believe this arrangement would convey for you.
    An Extreme's Guest network is separate from its Main network; that is the reason for having it.

  • I have a new mini mac and i want to use my existing external hard drive but it needs to be reformated how do i do this without loosing all my old photos?

    i have a new mini mac and i want to use my existing external hard drive but it needs to be reformated how do i do this without loosing all my old photos?

    Formatting will erase the drive.
    You need to copy the photo's to either your old computer, the Mac Mini or to a new external drive and then decide what to do with your existing external drive.
    For example: You could use one External drive for Photo's and one external drive for Time Machine to backup both your Mac Mini and the Photo drive.

  • I have a button in JSP page inside an UIWebView by pressing the button i want to run another existing iPhone native application in background only.Do anyone have a solution for this.

    I have a button in JSP page inside an UIWebView by pressing the button i want to run another
    existing iPhone native application in background only.Do anyone have a solution for this.

    Sounds like a virus.... I hope it's not...
    Launching Other Apps within an iPhone

  • Item category group not exist in CRM

    Hi all,
    I u2018m getting an error item category group not exist in CRM that item category group is in R/3
    So my question is weather I have to create that item category group in CRM or I have to download that one from r/3.
    If I create in CRM how to link the R/3 item category group to CRM one.
    Regards
    Rami

    There is definitely no exchange of neither transaction types nor item categories between an erp and a crm system. Also the dependent object like the organisational data profile or the partner profile are not exchanged.
    Instead for those transactions that are exchanged you need to do the customizing the same way in both systems, ERP and CRM.
    Regards, Kai

  • Need to use Group By but only want to group some of the columns not all

    Hello all! I am having some issues here. I am rather new to SQL and I am getting stuck with grouping. I have the query below but I only want to group by these columns, instead of all the columns in my select statement.
    ah.fund,
    ah.dept,
    ah.org,
    ah.acct,
    t.fund,
    t.dept,
    t.org,
    t.acct
    This will eventually go into Oracle reports builder. Is there any way I can archive this at all? The query will return all the t for a given time period, but they need to be grouped by the fully qualified account number which consists of the fund, dept, org and acct columns.
    Thanks in advance!
    SELECT ah.fund,
         ah.dept,
         ah.org,
         ah.acct,
         LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||SUBSTR(ah.acct,1,2) acct_no,
         LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||ah.acct acct_no1,
         t.fund,
         t.dept,
         t.org,
         t.acct,
         t.ACTIVITY_DATE,
         t.TYPE,
         t.AMT,
         t.description,
         t.TRANS_NO,
         t.RECEIPT_NO,
         DECODE(t.PO_NO,NULL,t.JOURNAL_NO,t.PO_NO) J_NO,
         DECODE(t.WARRANT_NO,NULL,t.WIRE_NO,t.WARRANT_NO) W_NO,
         t.VENDOR_NO,
         v.name||' ' ||v.first_name name,
         MIN(ah.eod_date)
    FROM ah,
         t,
         v
    WHERE ah.fund BETWEEN SUBSTR(:p_acct_from,0,3) AND SUBSTR(:p_acct_to,0,3)
         AND ah.dept BETWEEN SUBSTR(:p_acct_from,4,2) AND SUBSTR(:p_acct_to,4,2)
         AND ah.org BETWEEN SUBSTR(:p_acct_from,6,4) AND SUBSTR(:p_acct_to,6,4)
         AND ah.acct BETWEEN SUBSTR(:p_acct_from,10,5) AND SUBSTR(:p_acct_to,10,5)
         AND FLOOR(ah.acct/10000) IN (6,8)
         AND SUBSTR(ah.acct,3) != '000'
         AND ah.eod_date BETWEEN :p_from_date-1 AND :p_to_date
         AND t.fund (+) = ah.fund
         AND t.dept (+) = ah.dept
         AND t.org (+) = ah.org
         AND t.acct (+) = ah.acct
         AND TO_DATE(t.activity_date, 'dd-mon-yy') >= TO_DATE(:P_FROM_DATE,'dd-mon-yy')
         AND TO_DATE(t.activity_date, 'dd-mon-yy') <= TO_DATE(:P_TO_DATE,'dd-mon-yy')
         AND t.type IN( 'PI','JE','PR','VD','VU','AC','AD')
         AND (
              (:p_year = TO_CHAR(CURRENT_DATE,'YYYY')
              AND (t.po_no IS NULL
              OR (select TO_CHAR(open_date,'YYYY') FROM r WHERE po_no = t.po_no ) = TO_CHAR(CURRENT_DATE,'YYYY') ) )
              OR ((select TO_CHAR(open_date,'YYYY') FROM r WHERE po_no = t.po_no ) = :p_year )
    AND v.vendor_no (+) = t.vendor_no
    GROUP BY ah.fund,
         ah.dept,
         ah.org,
         ah.acct,
         t.fund,
         t.dept,
         t.org,
         t.acct,
         t.ACTIVITY_DATE,
         t.TYPE,
         t.AMT,
         t.description,
         t.TRANS_NO,
         t.RECEIPT_NO,
         DECODE(t.PO_NO,NULL,t.JOURNAL_NO,t.PO_NO),
         DECODE(t.WARRANT_NO,NULL,t.WIRE_NO,t.WARRANT_NO),
         t.VENDOR_NO,
         v.name||' ' ||v.first_name
    ORDER BY LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||SUBSTR(ah.acct,1,2),
         LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||ah.acct;

    In reports builder you can group the columns without having to group it in your query. It is also known as the break report which contains multiple groups in its data model.
        |            Q_1               |
                      |
                      |
        |       GRP_department         |
        | dept_no                      |
        | dept_name                    |
                      |
                      |
        |         GRP_employee         |
        | emp_no                       |
        | emp_first_name               |
        | emp_last_name                |
        | emp_middle_name              |
        | emp_date_of_birth            |
        | ...                          |
        ------------------------------

  • HT201328 Hi I have been allowed to unlock my iphone recently by AT/T. I want to keep my existing ios (5.0.1)  as it is on my iphone now.  I've been told to back up and restore by itunes but I am worry of updating my ios to the latest version automatically

    Hi
    I have been allowed to unlock my iphone recently by AT/T.
    I want to keep my existing ios (5.0.1)  as it is on my iphone now. 
    I've been told to back up and restore by itunes but I am worry of updating my ios to the latest version automatically.
    Please let me know how to keep the existing ios during the unlocking process.
    Thanks and nest regards
    Mohsen

    Restoring your phone, as is required to complete the unlock of your phone WILL update your iOS to the most current version.  There's no way around this.
    Either you keep 5.0.1 and a locked phone, or you get 6.0 and an unlocked phone.  Your choice.

  • I have new music I am adding to my itunes.  My ipod has the existing music from my itunes.  I want to delete the existing music from the ipod and only select the new music just imported into itunes be sync'd on to my ipod?

    I have new music I am adding to my itunes.  My ipod has the existing music from my itunes.  I want to delete the existing music from the ipod and only select the new music just imported into itunes be sync'd on to my ipod?

    Open itunes, connect ipod, select what you want to sync ( in the music tab)  sync.

  • I have a window asking: do you want to replace the existing Normal.dotm? what should i do? I'm on OSX 10.7.5 with Office 365 14.3.2 for mac 2011.

    I have a window asking: do you want to replace the existing Normal.dotm? what should i do? I'm on OSX 10.7.5 with Office 365 14.3.2 for mac 2011.

    That is not what I said.
    Normal.dotm is a template, not a .doc file. It is the template that every new document is based upon, IF you changed any of the template settings (font size or other attributes) then you will be prompted to save the changes.
    Did you? (or is this an old Windows Template)

  • Thanks for yr reply sofar that is clear and indeed, after I  changed the details at my apple ID account from the old Dutch credit card to the new Suisse credit card when I wanted to update my existing apps on the iPhone, I got the message that I can only

    thanks for yr reply
    sofar that is clear
    and indeed, after I
    changed the details at my apple ID account
    from the old Dutch credit card to the new Suisse credit card
    when I wanted to update my existing apps on the iPhone, I
    got the message that I can only use the Suisse Apps store.
    But how does that work?? Can I still update my existing Apps ?? How can I make my iPhone connects to the Suisse App Store ??
    thanks
    Best regards 
    [email protected]

    HI..
    I responded to you here >  https://discussions.apple.com/message/18112516#18112516

  • I want to group deliveries with the same BOLNR together

    I want to group deliveries with the same BOLNR together. Is there a FM or a BAPI for this?

    No,
    you will have to feed the data to the respective BAPi's to achieve this.
    BAPI_INB_DELIVERY_SAVEREPLICA
    BAPI_OUTB_DELIVERY_SAVEREPLICA

  • New Excise Group for Existing Plant

    Dear CIN Experts,
    We have query, as there is Change in Excise Group for Existing Plant, Question here is weather it is possible from functional part what will be effect on historical data and from CIN [Excise transaction] perspective and how to cope up with new excise related transaction like;
    1) Sales Excise Invoice
    2) Register Updates
    3) Utilization
    Kindly expedite from CIN perspective about the pro and cons for the same.
    Thanks in Advance,
    Ashish

    Hi
    For new Material type account determination there is no requiremnt of gioing for anew valuation grouping code.
    You go for a valuation grouping code only hwen you need to trigger differnt g/L accounts based on the PLant combination.
    YOu can go ahead with the existing account determination by maintaining the new account category reference & valuation classes to the new material type.
    Hope this solves your query
    Thanks & Regards
    Kishore

Maybe you are looking for

  • Costs in Third-Party Business Transaction

    In Third Party order processing the value of VPRS is taken from the vendor billing document. In billing document copying control at item level for position type TAS we have indicator F in the Billing Quantity (FKMGK) How to setup Customizing so the s

  • Sending anchored objects to back (Indesign CS3)

    I would like to create a graphic, make it inline, move it over type and send to back so that the type appears on top. No problem until I anchor it. Thanks for any help.

  • Transfering contacts from iphone back up to ipod touch. Can it be done

    I am thinking about getting a ipod touch cause my iphone 1st gen got wet, but it was backed up. If I buy an ipod touch can I transfer my back-up contact info to an ipod touch

  • RegEx with PL/SQL?

    Hi, i need a function that checks input for a valid MAC address ... like '00-02-A6-0B-09-1B' only HEX values should be included ... 'AJ-00-02-T9-0B-09' schould be invalid, 'cause AJ is not a HEX value ... is that possible in PL/SQL? or may i use rege

  • IMac wakes up approx. each 30min just to go back to sleep

    Hey there - since I am using Lion (yes, another Lion problem…) my iMac keeps waking up by himself when I put him into sleep (approx each 30m) and then goes back to sleep. This is absolutely annoying and not helpful when I need so sleep at night. Shut