How to get the exact measurement values.

Hi scripters,.

I want to get the exact values, indicated in the control panel. Please see the screenshots below.

1.png

I wrote the JS code is here. But I don't need values accurate Panel disclosed the clichés above.

 var myImages = app.activeDocument.links;
for(i = myImages.length-1; i >= 0 ; i--){
    var myImage = myImages[i];
    myImage.show();
    alert(String(myImage.parent.itemLink.parent.geometricBounds[3]-myImage.parent.itemLink.parent.geometricBounds[1]) + " × " + String(myImage.parent.itemLink.parent.geometricBounds[2]-myImage.parent.itemLink.parent.geometricBounds[0]));
    }

THX,

csm_phil

There are 12 points in a pica.

Must divide the 12 points and fired the modulo of the 12 on that:

function getPicas(points){
    return "" + Math.floor(points/12) + "p" + points%12;
}
alert(getPicas(504));
alert(getPicas(104.16));

Tags: InDesign

Similar Questions

  • How to get the RGB color values on the color picker component?

    How to get the RGB color values on the color picker component?

    trace (cp.selectedColor);

    Returns something like:

    16750950

    trace (key2cp.hexValue);

    Returns:

    ff9966

    I'm looking for RGB, for example, 0.5 0.5 0.5, corresponding to a gray color.

    Is there a chance that the RGB settings are hidden somewhere or is there a conversion function at least?

    Thank you.

    If key2cp.hexValue returns a string like 'abcdef', use:

    var s:String = key2cp.hexValue;

    var n: Number = Number("0x"+s);

    var r: Number = n > 16 & 0xff;
    var g:Number = n > 8 & 0xff;
    var b:Number = n & 0xff;

  • How to get the ActiveX component value change event?

    Hi all

    LV 8.6.1

    I try to get the ActiveX component value change event. I covered forum and through examples, but I can't get an idea of how "Recalling vi. For example, in the example 'ActiveX event Callback for IE.vi' it is used "recall vi". I've added an example where the change event of value with the mouse to the bottom of the event are scheduled to the structure of the event. Mouse down event OK work but change the value no. Can anyone describe what I need to add to my example vi who value the change event works fine?

    BR, Jim

    Here is the solution! "Value changed event" is not performed in the structure of the event, but in "Reminder VI".

  • How to get the current zoom value in the ID?

    Is there a way that can get the current zoom value in InDesign?

    ZoomValue.png

    Thank you very much.

    You could glance at the widget shown in your screenshot, at least when frame MDI (?) is displayed.

    The title of the window to kLayoutPresentationBoss, IID_IDOCUMENTPRESENTATION also reflects the value.

    Probably the best would be the kLayoutWidgetBoss, IID_IPANORAMA, GetXScaleFactor() - and GetYScaleFactor()!

    I'm just trying to imagine how a document would look like if these differ from each other ;-) and, better yet, how to achieve this objective in the user interface.

    BTW, only one notification is kDocWorkspaceBoss, Protocol IID_IWINDOW, order kUpdateDocumentUIStateCmdBoss.

    Another: there's a kDocWindowTitleModifyService...

    Edit: I note once again of course IID_IPANORAMA, observable of the subject kLayoutWidgetBoss.

    Dirk

  • How to get the exact position of the text?

    Hi try the code below, I do not get the exact position of the text.

    TextModel InterfacePtr< ITextModel > (() Utils< IXMLUtils >->QueryTextModel(inXMLElement));

    FrameList InterfacePtr< IFrameList > (textModel->QueryFrameList());

    TextIndex start_pos, end_pos;

    Utils< IXMLUtils > ()->GetElementIndices(inXMLElement, & start_pos, & end_pos);

    Int32 fidx;

    TextFrameColumn InterfacePtr<ITextFrameColumn> (frameList->QueryFrameContaining(start_pos, & fidx));

    UIDRef = focusedText:GetUIDRef(textFrameColumn);

    not signed int current_page = GetPageNumberFromUIDRef(focusedText);

    UID pageUID;

    UIDRef spreadUIDRef = GetPageSpreadUIDRef(current_page, pageUID);

    PMRect PageCoords = GetPagePasteBoardPos(UIDRef(db, pageUID));

    InterfacePtr<IWaxStrand> (((IWaxStrand*) textModel-> waxStrandFrameQueryStrand() kFrameListBoss IID_IWAXSTRAND)));

    if (waxStrandFrame is nil) Break;

    K2: waxIteratorscoped_ptr<IWaxIterator> (waxStrandFrame->NewWaxIterator());

    PMReal PositionY = 0;

    if (waxIterator is nil) Break;

    IWaxLine* waxLine = waxIterator->GetFirstWaxLine(start_pos);

    PositionY = waxLine->GetYPosition();

    Can you suggest a solution for above problem.

    Instead of GetYPosition, try waxLine-> GetToPasteboardMatrix(). Transform(&positionPB); Then you can convert it into page coordinates

  • Shape of the apex - how to get the primary key value manually?

    Hello

    Whenever I create form by using wizard Apex, he asks me to specify the trigger/sequence/pl/sql function to fill the primary key value.

    However, if I want to specify primary key myself (ie. undetermined generated automatically), how I can clarify that?

    Thanx

    Hello

    You mean by yourself: by hand or by a pl/sql?

    If you say by trigger, the system does not take on what number is sent. If you can give it "manually".

    May I ask what is the reason for this?

    See you soon,.

    Arnaud

  • How to get the maximum/more value in one line?

    I have a simple table view Pivot with dollars as a measure, a month on accounts on the rows and columns.  I want to emphasize the month that has the greatest value.  For example if the market value for the revenue account is for Jan, Feb 11, 50 Mar 10 and 0 for the rest of the month, then so I want to highlight the cell that contains 50 green. So, basically, I need to be able to identify the max value in a row in the PivotTable.

    If I add a max calculation, it returns the top value in all columns and rows. A calculation of rank also returns the rankings in all the columns and rows. How can I determine the largest value in a single row?

    Thank you

    J

    In general, go through measures based on level. Just tweak it like max (income per year)

    Just do it in the criteria tab and see how it works and I still thing you know how to

  • How to get the exact time of microsoft access in LabVIEW?

    Microsoft access stores date/time in the precision up to a second.

    It stores not milliseconds.

    So, when I get back access time and convert LabVIEW timestamp,

    The variant ' 2012-04-16 14:45:01 "(without millisecond) comes from the access database becomes 2012-04-16 14:45:00.999 in LabVIEW timestamp.". "

    I do not know how to ajouter.000 to the retrieved Variant.

    How can I prevent LabVIEW by subtracting 1 millisecond of the access date/time variant while converting LabVIEW timestamp?

    Double Post

    Please do not create a new message with the same question.  Especially when you are already supported in the other thread.

  • How to get the Radio button value after submit process

    I have a button called (P8_DELETED_RECORD) that has 2 choices (Yes and no) and would like to have my "anonymous PL/SQL block" after presenting the process run logic differenct depending on whether Yes or no is selected.

    How can I referecne the option button in the code, I tried several ways without having had no success.
    I tried:
    a. if: P8_DELETED_RECORD = "1" then
    b. if: P8_DELETED_RECORD_0 then
    b. if: P8_DELETED_RECORD_0 = 'Y' Then


    Using Apex 3.2.
    Thank you

    Hello

    Inside of your radio, what is your lov

    STATIC2:Yes; 1, none; 0

    in this more top of case, you can use the code below

    If: P8_DELETED_RECORD = 1 then
    ---
    end if

    When the value of your lov return changes in 'yes' or 'y' depending on whether you have to change the condition

    Thank you
    Loga

  • How to get the peak value

    Can I know how to get the 2 peak values v1 and v2 and 2 duration times t1 t2.

    Since there is a small amplitude noise, difficult to use the Max simplely.

    May need to use a filter such as wavelets or TREE to Denoise it first. Can I know how to use, any Toolbox in labview. How do the curve smooth first.

    Thank you.

    I can't watch your vi now (I'm at work), but if your signals are long enough, you might consider a median filter.  You can set the number of points before and after use.  I found that it is useful for some smoothing problems (not all).

  • How to get the fnd_profile.value in the host program

    Hi all

    How to get the FND_PROFILE. VALUE('ORG_ID') in the host program.

    I loved not below, but it failed.

    v_return =' $ORACLE_HOME/bin/sqlplus - s $FCP_LOGIN < < END

    set pagesize 0

    trigger the echo

    fnd_profile. Value ('ORG_ID');

    EXIT;

    END '

    echo $v_return

    but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »

    Kind regards

    UVA

    > but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »

    .. .who is the same thing that will happen if you run SQL * more and type "fnd_profile.value...". »

    Assuming that fnd_profile.value is a function, you must select from the something (say double) or assign to a variable.

  • How to get the marker?

    Hello:

    I want to use some api on the markers like the follwing picture, but I have no idea how to get the markerP params value that I've marked.

    11.png

    is anyone who knows how to get it, I found the example of the SDK, but I can't find anything about this.

    Thanks in advance!

    Hi, I have to say you are right, the reason why I could not the marker string was, I missed the code

    Err2(Suites.) MemorySuite1()-> AEGP_FreeMemHandle (unicodePH));

  • How to get the required column, the names of tables for the preparation of the report.

    Based on the MD50 how to get the exact name, the table names he joined for report development. as I am new on this project and the purchase of failet for R12.
    How can I start my approach to prepare the data for the report model? How can I search the database based on the respective diagrams of means?
    all input appreciated

    Hello

    You can find information about schema objects in eTRM Web site, you can also consult the documentation for product/module and see if it helps. If you already have any report (standard or custom), you can enable the trace and run the program to see which object it access or open the report using Report Designer and see the code.

    ETRM Oracle
    http://ETRM.Oracle.com

    Oracle Applications documentation
    http://www.Oracle.com/technology/documentation/applications.html

    Kind regards
    Hussein

  • How to get the lov value(true/false) that is running by pressing the F3 function key

    Hello

    I mapped key F3 function for list of values (lov), pressing F3 on the element of text (with associated lov) poster lov, but here the lov is implicitly run, so I am unable to get the value of lov(true/false), how to get the true or false value from the lov.

    I use Oracle forms 11 GR 2.

    What exactly do you mean by "the true or false value of the lov? Want to know if the user chose something from the lov. If so, you can create a KEY-LISTVAL-trigger on your textitem with something like

    IF SHOW_LOV('THE_NAME_OF_THE_LOV') THEN
      -- do something here
    END IF;
    
  • How can I move my head in the exact measurements of time?

    Relatively new to AE and want to know how can I move my head in the exact measurements in time.

    For example in a 59.94 project, I am to 01:00:14 and want to return 36 executives. In Premiere Pro I just type "-36" and I jump back 36 frames.

    I tried in AE and it went to 36 images in the comp. basically before my ever started time line. I tried '. ' " "" ' 0.36 ' "36.0036"with identical results back to-36 before the beginning of the model.

    Does anyone have a solution? I can't find it in the manual.

    Thanks in advance

    of after effects using:
    "To move forward some time or number of frames, click the display of the moment and then enter a plus sign (+) followed by the timecode or number of frames to advance." For example, enter + 20 to go forward 20 images or 01:00 to go forward one second. Precede the value with the sign (-) to go back. For example, enter +-20 to go backward 20 frames or + - 1:00 to go back a second. »

Maybe you are looking for

  • Cannot connect to YouTube, the page will not load.

    I use version 28.0 and I cleared my cache, cookies and history of the browser. I can watch a video on Youtube, if a direct link and sometimes access to the site itself, but I can't log on my YouTube account. When I click on login, the page tries to l

  • APPCRASH

    I just downloaded army Americas 3 and every time I try to play a problem occurs. the description of the problem, it's APPCRASH.normally I blame the game for it but the same thing happens when I open the sansa media converter

  • Cannot remove messages from the Inbox

    I'm unable to remove items from the Inbox

  • Windows Update failed... Codes listed error 80070570, 643, & 80070643

    I tried to fix it with the microsoft fix, also Assistant... tried system restore nothing works. three are important updates will not install error 80070570, 643, & 80070643 codes. These three updates have tried to install for the days and failing eve

  • Windows service install is not available in windows xp

    I try to go to itunes to download music on my ipod but I get message that software to connect with my ipod is not available and to uninstall itunes and download a more recent version, but when I try to uninstall I get installation service message win