positioning in the new ellipse problem layer

I created the new layer in my document, then a new ellipse within that layer.

I am positioning the new ellipse in the upper layer (vertically) and in the center of the layer along the x-axis (horizontal).

Nothing I have tried seems to move the left object to the starting x position layers (I can move it just fine!).

I'm confused because my high properties and the height of the layer are negative numbers - but when I look at the ruler, all are above zero?

What I am doing wrong in terms of positioning of the ellipse in the layer?

Here is a sample of my script:

var childLayer = currentLayer.layers[j];
var xmin = childLayer.pageItems[0].geometricBounds[0].toFixed(2); // top
var ymin = childLayer.pageItems[0].geometricBounds[1].toFixed(2); // left
var xmax = childLayer.pageItems[0].geometricBounds[2].toFixed(2); // bottom
var ymax = childLayer.pageItems[0].geometricBounds[3].toFixed(2); // right

var newBoneLayer = boneLayer.layers.add();
newBoneLayer.name = childLayer.name.replace(OBJECT_MARKER, "");
var halfOfWidth = parseFloat(childLayer.pageItems[0].width/2).toFixed(2);
var boneGuideXPosition = parseFloat(xmin + halfOfWidth).toFixed(2);
var boneGuide = newBoneLayer.pathItems.ellipse(ymin,boneGuideXPosition, 10.0, 10.0, true, false);

boneGuide.stroked = true;  
boneGuide.filled = true;  
boneGuide.opacity = 40.0; // set to 40% opacity
var newRGBColor = new RGBColor();
newRGBColor.red = 204; 
newRGBColor.green = 255; 
newRGBColor.blue = 255; 
boneGuide.fillColor = newRGBColor; 

Sorry my bad.

even in my script, it should be...

var x = AB[0]+((AB[2]-AB[0])/2);

Tags: Illustrator

Similar Questions

  • OfficeJet 6600 e-all-in-one: Wireless connectivity with the new router problem

    We had the printer since 12 months, workin with no problems.

    Just got a new modem/router (NETGEAR V7610) installed as part of the NBN implementation and I can't get the printer to connect to the new router. 5 and 2.4 G active networks. The two defined newtorks on security WPA2-PSK [AES].

    The printer detects the wireless (2. 4 g) network, but can't coplete the connection. Tried the two direct input the network key and using WMA.

    -The display panel shows "wireless invalid password (WPA) is entered.

    -The results of network printer test page indicates a FAILURE on safety.

    I was able to connect to multiple other devices (laptop, iphone, Kindle...) without any problem. Used the two direct entry of the key network and WMA.

    Anything else I can try?

    Find a new update of the firmware for the printer (May 9, 2016).

    After you apply the update, the printer is able to connect to the new modem.

  • Positioned on the new host, iPhone deleted old emails - where are they?

    Recently a company I work with just changed hosts. When they did, the new e-mail was similar to the old access (POP), to try to make the process as transparent as possible. After the servers updated, however, my iPhone seems to have removed all the old read the emails that have been downloaded on my device. Where are they now?

    Phone: iPhone 6

    OS: iOS 8

    App: Mail - native to the iphone

    mabcab wrote:

    Recently a company I work with just changed hosts. When they did, the new e-mail was similar to the old access (POP), to try to make the process as transparent as possible. After the servers updated, however, my iPhone seems to have removed all the old read the emails that have been downloaded on my device. Where are they now?

    Phone: iPhone 6

    OS: iOS 8

    App: Mail - native to the iphone

    You ask your personal COMPUTER or the new host?

  • Can I change the positions of the 'new window' and the 'new tab' under the file in Firefox 4?

    Under 'File' in Firefox 4, I want to move the positions of 'new window' and 'new tab' as it is in Firefox 3.

    You can use the Menu Editor extension to move the menu items around - https://addons.mozilla.org/firefox/addon/menu-editor/

  • Old hard drive files to the new laptop, problem of promise.

    How to move files from my old hard drive to my new computer?

    My old HP laptop dv1010 (Windows XP) has stopped working. The reason why it has stopped working is likely a defective power supply.

    I remove the hard drive from the dv1010 and linked to my new HP laptop dv7 - 6143cl with a Unitek Y-1031 USB2.0 to IDE.

    I have no problem, see the file with Windows 7 using the 'computer' link in the start menu. But I can't open one because of the permissions windows opens.

    http://I39.Photobucket.com/albums/E176/hp6350hp/anything%202011/2011-10-31dv1010Lockedfiles001.jpg

    My old laptop HP dv1010 had a connection with a password when I start it.

    Yet once how can I move files from my old hard drive to my new computer?

    Hello

    It is a utility that will add "Take Ownership" to the contextual right click menu.  The download is on the following link.

    Appropriating

    It is a zipped file.  If you do not have an extraction utility installed, download and install 7-Zip , which can be used to open it so that you can run the Setup program.  Then just right click the folder zipped, select 7 - Zip and extract the files.  When you're done, open the newly extracted folder and you can find the utility to add "Take Ownership" to the right click menu.  Double-click it to install it and then close the window.  You should now be able to right click on the files you need to access and select Take Ownership.

    Kind regards

    DP - K

  • Using of Print Production-> preview of the output to display individual departures, will result in severe display on the new iMac problems

    With the help of Print Production-> preview of the output for display in Acrobat DC 2015 separations, with separations selected/disable-selected causes strange color changes, deselected szeps sometimes do not disappear, must leave Acrobat and restarts repeatedly.  Race 2 new 27 "iMac, 10.11.3 & 10.10.5, same problems as computers, Acrobat DC is now useless for us, issues/fixes known?

    Hello

    We have today published a fix that solves the problem of the release preview which was recently introduced (with May 10 release). If you're not already updated to the latest patch, simply open Acrobat and visit help > check for updates to apply this hotfix.

    More details about this release and bug fixes is available here: help Acrobat | Release notes | DC Acrobat, Acrobat Reader DC | Update

    Please give it a try and let us know.

    Thank you

    -ashu

  • the new drsrule problem

    I'm looking to set up the DRS to separate the Nexus switches. I can do that by using the following code, however, is a problem where if I put as a scheduled task every iteration will create the rule of the DRS and so on and so on, even if it already exists. I was wondering if there was a better way to go about this? I appreciate it.

    $clusters = get-cluster

    foreach ($cluster in $clusters)
    {

    new-drsrule-cluster ($cluster | where {$cluster - notmatch "test *"})-name Nexus - keeptogether $false - VM * testn1k * - runasync - erroraction silentlycontinue

    }

    Why don't test you if the rule already exists and only create the rule when it is not.

    Like this

    $clusters = get-cluster | where {$_.} {Name - notmatch "test *"}

    foreach ($cluster in $clusters)
    {

    If (!) () Get-DrsRule-name $cluster - ErrorAction SilentlyContinue Nexus-Cluster)) {}

    new-drsrule-cluster $cluster - name Nexus - keeptogether $false - VM * testn1k * - runasync - erroraction silentlycontinue

    }

    }

  • Slate7 2800 - microsd with the new update problem

    Hello world.
    Yesterday, I received an OTA update on my slate7. After installation, the Tablet has become faster (especially at startup), but now it is not recognized any microsd! I tried different memory cards, but nothing. The update is 1.05.17_user.
    Is this a bug? How can I solve this problem?
    Thanks for the help!

    HP released a file rebuild on their support site that solves the problem.

    Please see this threadfor more information.

    WyreNut

  • Position of the new record in a table

    When I click CreateInsert button, a new blank record inserted above record previously selected in a table element. Can I configure components so after clicking on CreateInsert, the record is displayed in the bottom of the list (as last record)?
    Thank you
    Sergey Nikiforov

    Hello

    Replace your insertRow method in the implementing class ViewObject and write the code below

    int rangesize is getViewObject () .getRangeSize ();.
    getViewObject (.setRangeSize(-1));
    super.insertRowAtRangeIndex (getViewObject () .getRowCount (), line);
    getViewObject () .setCurrentRow (row);
    getViewObject () .setRangeSize (rangesize);

    Concerning
    B.Ram

    Edited by: Ramprasadb on July 8, 2010 19:02

  • The white balance with the new update problem

    Just updated to lightroom and now this happens every time I try to change the balance of whites, very annoying when you are using a controller k 4 having to move the mouse backward and that transmits up to now.

    Untitled.jpg

    Hi all

    This issue should be fixed in the 2015.6.1 CC update that went live today. Please upgrade to Lightroom to the latest version.

    More info here: Lightroom CC now available 2015.6.1

    Concerning

    Pete

  • Re: Windows 8.1 - Windows cannot find the new updates

    Hello

    I want to update some updates of Windows 8, but it says that Windows cannot find the new updates, problem code 80070003. IM desperate, I tried many sites and forums but nothing helps!

    Thanks for the replies

    Hello

    Can you please tell us which laptop model you have and what operating system are you using?
    If I understand you right, you have improved your Win8.1 machine and now you have problems to install the Windows updates.
    Is this correct?

  • Position of the object changes with the new layer

    After Effects CS6 11.0.4.2

    I have installed recent updates, according to this page (FAQ: what information should I provide when you ask a question on this forum?)

    10 Pro 64-bit Windows

    I have an AMD FX (tm) - 8350 eight cores 4 GHz processor

    8 GB RAM

    AMD Radeon 200 series graphics card R9

    3rd party plugins installed: 3-d element.

    I have an object made to 3D element bound to a null object to control its movement. The position that there is everything I like. However, when I add a new layer (layer setting, sound, text or other) changes the position of the null object. It comes to a lot of trouble because I use 3d objects and as they occupy a different position, their movement seems wrong.

    I wanted to add an adjustment layer, so I précomposé just what I have and add the adjustment to the model layer, so it does not change. It worked perfectly. But, now, I want to add a new text object, bring it to feature 3D extrude it and bind it to a null object, the problem is that if I add the null object, or the text layer to the original model, the previous objects will change their position.

    I use phrases such as wiggle and time * with the first null object. This has something to do with that evil?

    How can I solve this problem?

    Thank you

    Yes. The seed of wiggle() and other Pseudo-aleatoires functions is obtained according to the index. You must manually set a seed with seedRandom (< your="" value="" here="">, true) to avoid tampering. This is nothing unusual.

    Mylenium

  • positioning of the layer problem

    I insert a layer. Set the properties - top, left, width, height - but layer goes where he wants. property values honor in dreamweaver edit mode and even worse mistake of positioning in the preview/debug. can not understand. all other layers on page behave very well. the absolute value of the position, float to zero.

    > What are the features to leave out of the cut down version.

    Code mode?

    Walt

    "Malcolm N_" wrote in message
    News:[email protected]...
    > On Wednesday January 24, 2007 01:34:31 + 0000 (UTC), "elmorilloana".
    > wrote:
    >
    > I've been
    > teaching children to make the pages using pagemill as it's much more intuitive
    > that
    > dw. but things move on time - I learned "later." the forums are a beautiful
    > help.
    >
    > I think one of the problems is that DW is too high for some
    > people to start the html works - and so too expensive. No amateur
    > going to spend the full price, what other packages like Pagemill were
    > / are in the 50 to 100 dollar/pound / euro League.
    >
    > I already said that Adobe may well be Advisor to release the next DW
    > in the same way as Photoshop; all the professionals and
    > like Photoshop Elements for the internal market. The tricky part would be
    > be what are the features to leave out of the cut down version.
    >
    > --
    >
    > ~ Malcolm N...
    > ~

  • z index / layer of problems with the new YouTube widget!

    Hello!

    I am facing a problem with the new 'youtube' of social media widget. I currently have two layers in my projects. This is a project for which the menu scrolls initially and then sticks to the top of scrolling parallax. By continuing to scroll, the embedded YouTube video widget does not scroll under the menu as it should but scrolls through the menu. It's strange, as the YouTube widget was placed on level 1 and the menu is at level 2. Shouldn't the menu then always be on top? Only the new widget is not properly defined index-z?

    You can check my web project (and look at the code) here: http://www.firstlight.at

    Any help is greatly appreciated!

    I managed to solve the problem, and I believe this to certainly be a bug in Muse...

    In order to avoid widgets Youtube iframed swim on top of all the other div tags, I had to change the code, add wmode = "transparent" and wmode = "Opaque" to the class of the iframe. This works if you replace all the other parameters behind the CBC "&" by "& amp"tag.

    Here's the original code generated by Muse. This could not prevent my "2nd layer" slip below "Layer 1".

    Makes the following changes to the code, forced the Youtube widget below all other div again (I pinned all changes to "BOLD", so you can see the changes easily):

    Ensure that you do not miss the following change: you need to change all of the vipers '&' to '& amp' this procedure will not work!

    After the new version, I'm sure the Adobe team is working hard to bust of bug last version. But I hope that we will be dismantled soon, otherwise users using the youtube widget will have to recode output Muse whenever we make a change and it is exactly what is the Muse striving to prevent (; After all, in Dreamweaver, you can hardcode the change and he would stick!

    I hope that it will be useful to someone!

  • Layer duplicated to the new publication?  Weird problem with the duplicate() command.

    So, I'm writing a script that grabs the selected layers and throws them in a new document that corresponds to the original.

    But something strange that happens when I use duplicate several times in a row.  It duplicates my duplicate layers.

    I start with this selection:

    origional selection.PNG

    But an end to this result in my new doc:

    resulting problem.PNG

    This has me very confused.  I would appreciate someone looking at what I have.

    Thanks for the research.

    Here is the code:

    var FSTdoc = app.activeDocument;

    var curPATH = app.activeDocument.path+'/';

    fullNAME = app.activeDocument.fullName var;

    var ABSOfull = fullNAME.absoluteURI;

    var curPATHstr = String (curPATH);

    var fullNAMEstr = String (fullNAME);

    var theLayers = GetSelectedLayers();

    var HLDRdoc = app.documents.add (FSTdoc.width, FSTdoc.height, FSTdoc.resolution, FSTdoc.name, NewDocumentMode.RGB, FSTdoc.initialFill, FSTdoc.pixelAspectRatio, FSTdoc.bitsPerChannel, FSTdoc.colorProfileName);

    app.activeDocument = FSTdoc;

    LAY1 = theLayers [0] .duplicate (HLDRdoc, ElementPlacement. PLACEATBEGINNING);

    LAY2 = theLayers [1] .duplicate (HLDRdoc, ElementPlacement. PLACEATBEGINNING);

    lay3 = theLayers [2] .duplicate (HLDRdoc, ElementPlacement. PLACEATBEGINNING);

    function to get layers selected by paul m.;

    function GetSelectedLayers() {}

    var A = [];

    var desc11 = new ActionDescriptor();

    var ref9 = new ActionReference();

    Ref9.putClass (stringIDToTypeID ('layerSection'));

    desc11.putReference (charIDToTypeID ('null'), ref9);

    ref10 var = new ActionReference();

    Ref10.putEnumerated (charIDToTypeID ('Lyr'), charIDToTypeID ('Ordn'), charIDToTypeID ('Trgt'));

    desc11.putReference (charIDToTypeID ('From'), ref10);

    Try the lock to stop the script

    try {}

    executeAction (charIDToTypeID ('Mk'), desc11, DialogModes.NO);

    } catch (err) {}

    Alert ("Script will not work on locked layers.");

    throw new Error ("locked layer");

    }

    var gL = activeDocument.activeLayer.layers;

    for (var i = 0; i < gL.length; i ++) {}

    A.push (GL [i]);

    }

    executeAction (charIDToTypeID ('undo'), undefined, DialogModes.NO);

    return A;

    };

    What version of Photoshop are you using? I think the problem is that you have multiple selected layers when you perform step duplicate. With the new version that will be fooled all selected layers. By three not fooled, you are indeed fool all the layers selected three times.

    I think you should do that one step of dupe or change the layer selection to a single layer after layer selected and before step of dupe.

Maybe you are looking for