Javascript: copy an object to a new layer and tracing it

Hello everybody:
I'm using Illustrator CS5 on Mac. I need to copy an objecto to a new layer and tracing it. I'm trying to execute the script above. There is no problem with the copy to a new layer, but Illustrator returns the error "newItem.trace is not a function". Sorry because this is my first script and i'm lost.
Thank you in advance.
    var myDoc = app.activeDocument;
    var sel = myDoc.selection[0];
  if ( myDoc.selection.length > 0 ) {
    var newLayer = myDoc.layers.add();
    var newItem = sel.duplicate( newLayer, ElementPlacement.PLACEATEND );
    var myTrace = newitem.trace();
    var myOpts = myTrace.tracing.tracingOptions;
    myOpts.tracingModeType = 'TRACINGMODEBLACKANDWHITE';
    app.redraw();
    myTrace.tracing.expandTracing();

Hi Jose, if your selection is other than PlacedItems or RasterItems, you have to rasterize it first.

Similar Messages

  • Photoshop cs6 with OS X Yosemite, I open a new layer and i paint on it but if I use cmd Z  it does not undo fluently the most of the time.

    Photoshop cs6 with OS X Yosemite, I open a new layer and i paint on it but if I use cmd Z  it does not undo fluently the most of the time.

    Grab the plug-in posted here:  http://helpx.adobe.com/photoshop/kb/photoshop-menus-turn-white-mac.html
    That should get everything working as expected on Yosemite.

  • In PC I have changed the default app location from default to other and copied the previous content to new location and changed the Default location in preference. Now in iTunes, my previous apps are not visible. Is there any solution to this?

    In PC I have changed the default app location from (c:/users/username/My Music/iTunes) to other (d:iTunes)  and copied the previous content to new location and changed the Default location in Edit preference. Now in iTunes, my previous apps are not visible. Is there any solution to this?

    wjosten - thanks very much for the detailed instructions. I'll try this as soon as I get my replacement and it looks like you'll probably end up getting the green tick

  • I copied my library to my new computer and I have some songs with greek characters and when I click them to play they change into something which is not readable. I have delete them and copy them again and also delete and re-download itunes

    I copied my library to my new computer and I have some songs with greek characters and when I click them to play they change into something which is not readable. I have delete them and copy them again and also delete and re-download itunes.

    im so happy I have a iTunes Card Code absolutely free! I got it at http://linkbitty.com/freeitunes2014

  • Copy selected items to a new layer

    In order to create a multi-layered document for different pricing versions, I would like to be able to
    • create the relevant layers (this works)
    • duplicate the items I've selected to those layers
    I can't see an easy way to identify the text frames/tables that contain prices, so we will have to select them page by page, but a script that then copied them and pasted in place on a new layer would save time.
    So far everything I've tried has failed to work.
    tell application "Adobe InDesign CC"
    copy
    paste in place
    end tell
    - this works, but if I try 'paste in place on layer "EURO PRICES" it won't. Neither can I identify what I've just pasted by 'set my_prices to paste in place'
    I'd like to say 'duplicate selection to layer "EURO PRICES" but it doesn't like that either.
    I'm going round in circles trying to do something that I know must be simple, but I can't see it!
    Any help very gratefully received.
    The bits that work so far are:
    tell application "Adobe InDesign CC"
        tell document 1
            set name of layer 1 to "BASE LAYER"
            make new layer with properties {name:"BSP PRICES", layer color:red}
            make new layer with properties {name:"EURO PRICES", layer color:gold}
            make new layer with properties {name:"INT PRICES", layer color:green}
        end tell 
    end tell

    Hi,
    HarrietSmith wrote:
    I can't see an easy way to identify the text frames/tables that contain prices
    Lets take a look..., show us a piece of...
    Otherwise use duplicate() method instead of (copy...paste).
    I am not familiar with applescript but something like:
    duplicate to layer "EURO PRICES"
    Jarek

  • Copying selection to new layer and changing hue/saturation?

    I made a selection around someone's teeth and I copied it to a new layer.
    1. On the new layer, using Hue/Saturation, what is the best way to remove some of the yellow in the teeth? I chose yellow from the drop-down, though I am doing something wrong because the teeth are not appearing more white.
    2. Is it a better idea to do this as an adjustment layer instead of copying it to a different layer, or is it just a different way to do the same thing?
    Thanks.

    "If you create a new layer it is likely to create more additional data than the Mask of an Adjustment Layer."
    1. What do you mean by additional data?
    If you lift a part of an image onto a new layer that layer has as many channels as the image (3 for RGB, 4 for CMYK etc.) whereas an Adjsutment Layer has one channel (its Mask), so the file would increase in size more in the first case (unless it is a grayscale image or possibly if the layer has no detail etc.).
    2. To get rid of yellow in the teeth, are you suggesting to slightly desaturate in the Masters and than a bit more in the yellows? So doing it to both?
    Yes, but just try and see if it helps with your image.

  • I created a new layer and copied the contents of another layer into the new layer. Now whenever I ed

    I have a template that I am editing. I have created new layers by duplicating an existing layer. The problem I am having is that anytime I make a change to a duplicated layer it changes the original as well. ie if I attempt to edit the action script on the new layer it changes the action script on the original? It seems as though they are linked and I can not find a way to unlink them??

    You should be able to edit the immediately present contents of different layers without affecting other layers, but if you are editing anything at a level below the layer, such as doubleclicking to edit an object in that timeline, you are changing it anywhere it is used.

  • ODI objects import in new Master and Work Repository

    Hi,
    I have created a new master and work repository.
    Now,I need to import rest of the ODI objects which are associated with different Master and Work Repository.
    How do i proceed. I need a proper sequence to import the ODI objects.
    I mean topology,projects,model how to initiate.
    Thanks.

    Hi,
    Is it essential to create a new master and work repository and import the master and work repository xml files.
    Or if we just click on import master repository and give the connection details of where we want it will also work without creating it.
    when I click on new in ODI tool, it shows two options create master repository and import master repository.
    In my case which option should I go for?
    I just need to create development env on new server by importing all the required xml files on my local machine.
    Please guide...
    Thanks.

  • Is it possible to copy a swf to a new location and still use debug

    Hi,
    I'm developing a SWF using Flex. When I generate my SWF file I'd like to copy it to a new location (a folder under my website root folder) so that it runs in my local version of a website I'm working on.
    Before when working with a Flash movie, using Flash Develop I was able to set up a batch file to copy the generate file to the SWF folder under my website, is it possible to do this now in Flex builder and still be able to use the Flex step through debugger?
    Thanks
    Stephen

    Just point your debug settings to that swf file
    in flex Builder > Run > Debug > Other (choose the right project) -- and change the debug path
    that should work I think

  • Oracle APPS schema copy with all privileges to new schema and table space

    Hi all,
    Here is scenario:
    I have installed e-business suite in windows 2003 server for training environment using production (prod), single node and without vision (demo).
    i have to create a new table space in e:\oracle\prodmanz with similar content as in proddata and create a new schema called manz with same privileges as APPS.
    Kindly advice.
    Manish Kumar Chudasama
    email: [email protected] cc to [email protected]
    Thanks in advance guys.

    Hi Khalid,
    Ideally when you execute sql 'create schema <schema_name>' then the logged in user is going to default owner of the schema and you should see that under 'object privileges' of that user.
    The user will have 'create any' privileges which means the user has all the privileges on that schema.
    if you want to check who is owner of the schema in the system, please check 'SCHEMAS' under views in SYS.
    Regards,
    Venkat N.

  • Javascript window.open call results in new window and not new tab.

    I'm creating an extension and using JS to open a new window. I've tried a variety of forms including something like: window.open("https://www.FOO.com" + dest,,"_newtab") and just window.open(url).. The option is set (tools/options) to open in a new tab. I've looked at preferences and forum suggestions to no avail. The proper url opens in a new window instead.
    I've disabled all other addons and plugins.
    I suspect I'm doing something silly, but would appreciate any insights.
    Thx, --Don

    Thanks for the reply. I'd seen those articles. AFAIK, the default settings are as they should be to open in a new tab (3 & 2 respectively). ...new_window.override.external = -1 though I don't know what that does or if it has any bearing on the issue.
    Thx, --Don

  • Copied L-objects not selected by PCH

    we copied L-objects to a new PLVAR and number range. All objects and relations are shown in PP02 but logical database PCH does not select them.
    Any ideas?

    issue solved. We had to run RHPLOGI0.

  • Copy paiste objects into the exact position!

    helllo forumers.
    i have 2 questions about the copy paiste command.
    1st) question is i have multiple objects on one layer circles rectagnles and so on,im trying to copy paiste one of those objects onto a new layer.but it wont
    be paisted on the exact same position,rather its moving into the middle of the art board,is there a way to copy paiste an object onto another layer and retaining its initial position on the art board?
    2nd question is there also a way to copy paiste from illustrator into photoshop and also the object to fall into place where it sohuld be located,initial posiiton
    thats on the illustrator art board to be paisted onto the photoshop art board.cos again i have the same problem the object gets paisted onto the middle of the
    photoshop artboard and then i have to do the nudging myself.
    thank you.

    hello steve.
    1st question solved pretty quick i may say.
    the 2nd question is a lttle bit confusing,is there a link i can see of this demonstration?
    thank you.

  • Using content aware with a new layer

    I am trying to use content aware with a new layer which i have made a smart object but when I select fill it is greyed out. why?.

    CAF doesn't have a Sample all layers option, and needs source pixels to work on.  The best you can do is select those parts of the background layer that you are happy to be sampled from, and copy them to a new layer and use CAF on that layer.  This prevents gaps in the landscape being filled with a foregrounsd subject's head!
    You can then add a layer mask to that layer to the new layer to use only those parts you need.

  • Photoshop CS5 crashes when dragging a new layer

    I was searching the forum for similar problems, but non of the threads had a solution (except uninstalling and installing again PS CS5 or even worse - formatting my PC).
    I must say that this problem is quite new. PS was working flawlessly for a few months. It crashes when I paste a new layer and drag it.
    These are my specs:
    * HP Pavilion 9750ej
    * Nvidia GeForce 8400M GS with the latest driver 266.58 (I uninstalled the previous one, and had a clean install of the new driver)
    * 2GB RAM
    * 11.7GB of FREE SPACE on 320GB HDD (I know it's not much, but it shouldn't cause PS to crash, especially when I'm working with low-res pics)
    I don't know how to create a crash-log, but I would attach if you could tell me how, and if it's needed.
    Thanks!

    You haven't said what version of Windows you're running.
    You don't need to do anything special to create a crash log; all versions of Windows keep this information already in logs.  These logs typically keep information a long time, possibly all the way back to your installation of Windows.
    What you want to do is to get into the Windows Event Viewer.  On a modern system you can hit Start then type event log into the search box, then when View event logs comes up, click it.
    A Photoshop crash will be in the Windows Logs - Application section as an Application Error.
    You'll want to copy the textual description, which should include the Faulting module, and paste it here.  Usually the Faulting module tells us what part of your system is failing.
    -Noel

Maybe you are looking for

  • Print Quality Issues on OfficeJet Pro 8500 A909g

    The print utility says that the onlly cartridge getting low on ink is the yellow, but the guide says not to change the cartridge until it gives you the message to change it. And it has been printing OK until today, when the black ink started getting

  • How to install IOS sdk for Xcode 3.1.1 on OS 10.5.8

    Hi I am using 10.5.8 OS. I have just installed XCode 3.1.1 from http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0 .1.1.0.3.1.3.3.1. The disk image did not have IOS sdk (for iphone/ipad simulations). Is it possible to do

  • Exit a function in JSP

    How can I exit a function in JSp my code is <%! String Dothis(int level) if(level==2) //exit the function else %> How can I exit this function ..... Break label does not work...as I am not able to declare a label Pl...guide me smita

  • Second User Account - Safari Keychain?

    I've got 4 accounts on my Macbook Pro set up. Admin, my personal account, guest, and an account for my girlfriend/brother to use - Other Users. When someone's using Safari on the Other Users account, every so often it comes up with a login window and

  • Added Credits No Longer Show...

    Whenever I want to add a credits scene, it tells me that it has been added, but when I try to playback my movie, it just skips over the credits scene. Does anyone know what's going on and how to fix it?