equivalent SDK anchoredObjectSettings

Hello

I have a question on the following line of script JSX:

app.anchoredObjectSettings.anchorPoint = AnchorPoint.LEFT_CENTER_ANCHOR;

I would like to do something similar in C++ with the InDesign SDK, and I studied the SDK samples (for example, SnpManipulateInline.cpp) for this and

I can't find something that works. What I got so far is the following:

InterfacePtr < IAnchoredObjectSuite > ep1 (GetExecutionContextSession (), IID_IANCHOREDOBJECT_ISUITE);

If (ep1! = nil)

{

IAnchoredObjectData::AnchoredHorizontal ah = ep1-> GetAnchorPtHorizontal();

IAnchoredObjectData::AnchoredVertical av = ep1-> GetAnchorPtVertical();

EP1-> SetAnchorPtHorizontal(IAnchoredObjectData::AnchoredHorizontal::kLeftSide);

EP1-> SetAnchorPtVertical(IAnchoredObjectData::AnchoredVertical::kObjectCenter);

}

But the result for ep1 sucks.

I don't think I'm on the right track. Can someone tell me what code should I have to get the same results as the line of JSX script?

Thanks in advance.

Greetings,

Jan

Hi Jan,

the interface IAnchoredObjectSuite is no not part of the kSessionBoss. In the documentation of the API in the SDK, you can find certain classes of boss that contains this interface, for example kWorkspaceBoss.

Markus

Tags: InDesign

Similar Questions

  • equivalent SDK visibleBounds

    Hello

    I searched for this and have tried different examples of code, but I can't understand this:

    I have an old .jsx InDesign script that does something like this:

    var point = app.activeWindow.activePage.allPageItems [0];

    Alert (Item.visibleBounds);

    My question is what is the equivalent of visibleBounds in C++ for the InDesign SDK? I can't produce the same values, as does the script.

    Should what code I have in order to get the same values as the script?

    I now have something like this:

    PBPMRect bBoxPasteboard1 = Utils<front:IGeometryFacade> ()->GetItemBounds(imgRef, transform:PasteboardCoordinates(), geometry,:,OuterStrokeBounds());

    InterfacePtr<IHierarchy> pageItemHierarchy1 (imgRef, UseDefaultIID());

    UIDRef pageRef1 (database Utils<ILayoutUtils> ()->GetOwnerPageUID(pageItemHierarchy1));

    InterfacePtr<IGeometry> pageGeo1 (pageRef1, UseDefaultIID());

    TransformPasteboardRectToInner(pageGeo1, & bBoxPasteboard1);

    InterfacePtr<IGeometry> itemGeo1 (imgRef, IID_IGEOMETRY);

    const PMRect itemBounds1 = itemGeo1->GetStrokeBoundingBox();

    I hope someone can help me. Thanks in advance.

    Hello john_1985,

    I think the visibleBounds in a script to match the StrokeBoundingBox in C++ and in a script geometricBounds correspond to the PathBoundingBox in C++, but in the script, you get the values in units of app.scriptPreferences.measurementUnit and C++, you get the point values. Try to set the camera in the MeasurementUnits.POINTS script and then to compare the values of script with the values of C++. I don't know if the values of script are cardboard, fattening, parent or internal coordinates, but you can try them all.

    Markus

  • BlackBerry sdk equivalent of order?

    Hi, all the newbie here.

    I have a LabelField and a BitmapField. I want the label on top of the bitmap image. How can I do this?

    Draw the label after the Bitmap image. Drawing occurs on a way from the bottom up, so the first thing that you draw is on the background, the last thing that you draw is on top.

    With regard to the fields itself you can create a custom handler and position the LabelField in the same area as the BitmapField and, as mentioned above, draw the LabelField after the BitmapField.

  • Problems with the examples in the SDK CC / xcode

    I have Illustrator CC 2015 (19.1.0) and fresh SDK downloaded (AI_CC_2015_SDK_Mac_44_0.dmg). Version 6.4 (6E35b), OS X 10.5 El Capitan of XCode.

    The sample plugins do not show their signs in the window menu. I tried FreeGrid, tutorial, SnippetRunner. When I choose window-> SDK-> SnippetRunner - nothing happens. Only EmptyPanel shows its controls (Control Panel) and bar, but there a few strange rectangle with pictures above him, see the screenshot. What is? Any ideas?

    Screen Shot 2015-10-03 at 23.38.55.png

    You must build the equivalent * using Flash Builder user interface projects.

  • How to add in DVS ESX hosts with vsphere SDK for perl?

    Hello

    I am a newbie to vsphere SDK for perl. Just started using it for automation of one month back. , I was looking for options to automate the addition of ESXi servers and their physical cards in the distributed virtual switch. I got some details on how to add using powerCLI. However, my requirements are in the use of vsphere SDK for perl. Any help would be appreciated.

    Have we not like subroutines or plug editable in vsphere SDK for perl inorder to add host ESX in DVS. ?
    Thank you and best regards,
    Lebou

    You can certainly do it in Perl.  I don't have a working example, but perhaps that William will be when he catches this thread

    If I have time tomorrow, I'll try to put something together to help you get started, but you can also simply map the logic of LucD script.

    Basically Get - view is equivalent to Vim: get_view() and New-Object calls should be mapped to the type of object in Perl, for example, instead of VMware.Vim.DVSConfigSpec New-Object, we $spec = DVSConfigSpec-> (again).

  • Run the Command Shell in Panel SDK Mac

    Hello

    I´d want to run the next task with a sign:

    • make the active sequence

    • When finished send the output video file to another application using Apple Script

    Examples of the Panel SDK are a very good start. The missing part is so, how can I send a shell command that executes an AppleScript script?

    ExtendScript Toolkit, I found a feature that seems promising. But the execution of this script appears only a warning window saying "failed." Here´s code:

    var test = UIAutomationSupport.helper.executeConsoleCommand ("ls - l");

    Alert (test);

    So first is has an equivalent function as system.callSystem() in After Effects?

    Thank you

    Thomas

    [I mentioned Thomas useful CreateProcess() function, in CEP.]

  • Equivalent of PowerShell to esxcfg - vmknic.pl

    Hello

    I've been to the lookout on the forums for a while that we adopt ESX3i but now it's time to actually ask a question because I'm out of ideas.

    I'm looking for is an equivalent of Toolbox of powershell/VI esxcfg - vmknic.pl - Server

    I created a virtual machine port group, and then use the perl script and the above settings to "convert" to a group of VMkernel Port that will be used for vMotion.  It works as I want, but I do not hardcode a path of a script that may or may not exist.

    My investigations have turned up a possible answer, who expected in theory (in my mind at least) work, but he keeps asking me an IP address and a subnet mask while the perl script method is very happy to leave it to DHCP, which is what I want.

    The method of powershell (as shown by d_hristov at the beginning of August) I've tried is

    The help of New-VMHostNetworkAdapter said that leaving the switch - IP will be average that DHCP will be used, but which does not appear to be the case because the line causes an error indicating that an IP address is required when you create a VM Core adapter.

    I can miss a fundamental aspect that I just dove into it with that powershell/ESX little knowledge that I have, but I was able to sort most of the things out there (with the knowledge on these forums) so that we can automate the configuration of an ESX host.  Any chance someone could enlighten me as to why things don't work?

    Thank you

    James

    I wonder if a portgroup VMkernel with DHCP is a valid configuration or not?

    I know that the with esxcfg orders you can configure what a portgroup VMKernel.

    esxcfg-vswitch -A  
    esxcfg-vmknic -a  -i DHCP
    

    But if you look in the SDK, the AddVirtualNic method said "in the case of a server ESX, DHCP is not supported, and will throw this exception " under the fault InvalidArgument.

    And if you try to use the following syntax you indeed get an InvalidArgument fault.

    $esxname = 
    $pgname = 
    $swname = 
    
    $esx = (Get-VMHost -Name $esxname) | Get-View
    $hns = Get-View -Id $esx.configManager.networkSystem
    
    $pgspec = New-Object VMware.Vim.HostPortGroupSpec
    $pgspec.name = $pgname
    $pgspec.Policy = New-Object VMware.Vim.HostNetworkPolicy
    $pgspec.vlanId = 0
    $pgspec.vswitchName = $swname
    $hns.AddPortGroup($pgspec)
    
    $nicspec = New-Object VMware.Vim.HostVirtualNicSpec
    $nicspec.ip = New-Object VMware.Vim.HostIpConfig
    $nicspec.ip.dhcp = $true
    
    $hns.AddVirtualNic($pgname, $nicspec)
    

    Can anyone shed a light?

  • Equivalent of Acrobat mode "presentation" of the PPT?

    I convinced a client to let me use an interactive (on InDesign CS5) PDF instead of TPP for its design of the courtroom. It's absolutely beautiful work! The * only * Powerpoint feature that I was not able to replicate/Excel/find a workaround solution is "Presentation Mode" from Powerpoint for when the PDF file is projected on the screen. It must be able to see which slide will come without the rest of the Court, be able to see.

    The only solution I thought of because it's SO awkward: have two laptops, one of which provides that the PDF file in mode full screen, who is in his eyes and has view Page... If progress there two shows at the same time, it will be able to cross the two laptops of reference. Pretty horrible, right?

    I am at a loss. I thought that, if two heads are better than one, thousands of users here will SURELY be able to help out me. Thanks in advance for any suggestions you may have!

    Sorry, but there is no equivalent functionality in Acrobat or Adobe Reader, and no way to implement with script or even the SDK. It is requested before, but I can't say if this will never happen.

  • How can I uninstall Sierra &amp; return to El Capitan without an external hard drive or equivalent required by the instructions online?

    How can I uninstall Sierra & return to El Capitan without an external hard drive or equivalent required by the instructions online? I find too many misadventures and not happy.

    Hello

    Check out this useful tutorial: https://www.igeeksblog.com/how-to-downgrade-macos-sierra-to-mac-os-x-el-capitan/

  • Workout App does not define 'fast market' equivalent?

    When I use the app to drive on my Apple Watch when I went up on a normal bike, not all of my journey is considered to be a workout.  I can be riding for an hour, but the app decides that the only parts of this time count for a workout.  The explanatory note said I have to do the equivalent of a brisk walk.  What is c?  Is it using my pulse?  If so, it's too bad because I take the medication that slows down quite to the bottom of my heart rate and it is very difficult to be in green all the time.  My bike course map is painted in green, yellow and Red areas.  So if I stop briefly for traffic, it is red and does not count.  If it's yellow, it doesn't count... so it appears.  This means that a one hour bike ride can have only 15 minutes of training time.  That makes no sense to me.  Have I not that bad?

    Tracy Rog wrote:

    ..  The explanatory note said I have to do the equivalent of a brisk walk.  What is c?  Is it using my pulse?  ..

    Progress towards your daily goal of exercise of credit, the application of the activity is to identify the activity equal or exceed the intensity of a brisk walk. This requirement applies as well to the general course daily wear and record training sessions through the training exercise credit app which is awarded for each minute during which this condition is met.

    The definition of a brisk walk varies from one person to another and depends on your personal information.

    To verify that this is correct - and update over time:

    • On your iPhone, in the application of the watch, go to: My Watch (tab) > health > edit - tap and adjust the settings, then press on in fact.

    Apple Watch uses different sensors and data sources to track the results of training sessions, depending on the type of activity. For example, with Apple Watch (first generation) and the models of series 1, the watch can access data matched iPhone GPS if it is taken along during the walk outdoors, running and cycling training. (Series 2 has built-in GPS).

    Calibrate your watch can improve the accuracy of the estimates made by the activity and workout app app. More information and instructions for calibration of your watch are available via the link below. The article also includes instructions for resetting the calibration data and leave.

    If you prefer to receive credits of exercise during the duration of your training sessions, regardless of their estimated intensity levels, follow them through the application of the training session using 'Other' as the type of activity. This credit a minute of exercise for each minute of the workout. Active calories will be estimated at a rate equivalent to a brisk walk or based on the data recorded by the heart rate sensor, according to what is higher.

    More information:

  • CTRL + SHIFT MAC equivalent mode icon

    New Mac user here:

    Is there a way to do an equivalent to Ctrl-Shift file selection icon?

    I get in the view of the list in now Shift, but in icon mode Shift seems to behave as a control, add individual files to the selection, rather than all files between the first and last selected...?

    Unfortunately, no. To do this, I suggest you drag the slider with the trackpad (or mouse) to select all the files at once.

  • In Firefox Mobile Android version 38 do not work a pageWorker! (cross-page-sdk)

    I'm developing an addon for android mobile version of Firefox and use the api high level ' sdk/page-worker' for my process.
    But when I updated Firefox to version 38, page/sdk-worker do not work.
    I try to use the source code of the page https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-worker , but it does not work too. I mean that without error, but the background page was not created.
    For example, if I'm using the following source code:

    var pageWorker = require("sdk/page-worker");
    var tmp = pageWorker.Page({)
    contentScript: "console.log ("Im loaded!");"
    });

    I have no errors or warnings and did not log console "Im loaded! It is only work on android mobile version of FIrefox 38. 37 mobile Firefox, it works well (and desktop version of 38 Firefox works well).

    This is a bug or a new feature? In the changelog for Firefox 38 nothing about this...

    Thank you! I await your response!

    This is a user support forum asking on https://groups.google.com/forum/#! forum/mozilla-labs-jetpack or filing a bug with the sdk of addons would be better https://bugzilla.mozilla.org/enter_bug.cgi?product=Add-on%20SDK

  • I'm looking for the Mac key combination which is equivalent to Alt + Tab in Windows that allows you to choose Open Windows (toggle).

    I'm looking for the Mac key combination which is equivalent to Alt + Tab in Windows that allows you to choose Open Windows (pass) but I can't find this info.  I hope that someone will tell me what combination of keys and as a bonus, where I can find it in the menu help. Thank you!

    The standard keyboard shortcuts are listed here:

    Keyboard shortcuts in Mac - Apple Support

    You can also define your own in System Preferences > keyboard

  • Equivalent of Mac for gthumb

    Gthumb Linux is excellent for photos sort by date - is there a mac equivalent for gthumb? Thank you

    Probably not many people here know gthumb - at least I don't have. But the application overview does not approach?

  • Is there an equivalent to press a hashing key when asked to do so during the phone call on Apple Watch?

    Is there an equivalent to press a hashing key when talking about Apple Watch phone app. ?

    I tried to leave messages on the voicemail of the recipient but to end leave my message, I wonder to press the pound key, which I can't do the watch.  I tried pressing the red button "end" on the dial of the watch, but that has not worked.  I ended up having to take my phone out and starting from scratch.

    Thanks in advance.

    Hello

    If you want to suggest that Apple consider adding a hash key to use when making calls on Apple Watch, you can do so here:

    https://www.Apple.com/feedback/watch.html

Maybe you are looking for

  • Problem setting P1007 on Mac

    I use Mac OS X 10.6.3 and after installing HP LaserJet P1007, get the following error while trying to print any page. The demo page prints fine however. Process: PrintJobMgr [253]Path: / System/Library/Printers/Libraries/PrintJobMgr/happy/MacOS/Print

  • Hard disk partitioning

    I'm about to the partition of my hard drive and I want to know if I would be able to partition my hard drive, then if I need is no longer the partition (I install Windows without Boot Camp), it will take format me the entire drive or I'll be able to

  • frequency sweep performance in the profile of stimulus Editor

    Hi all I am trying to understand what is the best way to do this. I have an output signal. I want to start with a 5V signal, so I want to do it in a sine wave of amplitude of 0.05v starting at 1 Hz and gradually increase the Frequency, squirt up to 5

  • XYZ coordinates with matrices?

    I'm doing a trace of contours.  Currently I have three tables 1 d containing x, y and z coordinates.  Contour 3D of VI in labview option requires an x, y and z of the matrix, every 2D.  I don't know how to do in this regard.  Thank you.

  • Error with DAQmx 200220

    I try to use a device with NOR-DAQmx, NI USB-6210.  My request is: Error-200220 occurred at .vi:1 DAQmx create channel (frequency impulse generation Co) Possible reasons: Device identifier is invalid. Specified device: Dev2 Task name: _unnamedTask Ho