How to find out selected AssignedStory or Link?

Hello to all,
can anyone pls. explain how to find out which assigned story or link is selected at the time the script is fired.
My problem is this: I would like to place an image into selected rectangle which is exported into .icml. So, for example, you have few exported rectangles and you would like to place an image into the one which is selected (through link or assignment panel). Because you can not select a rectangle in InCopy like you can in InDesign I tried to take a look through assigned stories...
                   For aCounter As Integer = 1 To myDocument.Assignments.Count
                        Dim myAssignment As InCopy.Assignment = myDocument.Assignments.Item(aCounter)
                        For sCounter As Integer = 1 To myAssignment.AssignedStories.Count
                            Dim myAssignedStory As InCopy.AssignedStory = myAssignment.AssignedStories.Item(sCounter)
                            Dim myStoryRef As Object = myAssignedStory.StoryReference
                            find out if assigned story or story reference is selected
                            'Rectangle
                            If TypeName(myStoryRef) = "Rectangle" Then
                                Dim myObjectRectangle As InCopy.Rectangle = myStoryRef
                                If myObjectRectangle.Graphics.Count = 0 And myObjectRectangle.Images.Count = 0 Then
                                    'CheckOut if needed
                                    'Place Media
                                End If
                            End If
                        Next
                    Next
Kind regards,
Marko

Well,
I couldn't solve this without using a placeholder image. I found that you need to check if the selection is an image and than replace that image... So something like this below:
                'Check if there is a selected image for relink
                If myDocument.Selection.Count = 1 Then
                    If TypeName(myDocument.Selection.Item(1)) = "Image" Then
                        myImage = myDocument.Selection.Item(1)
                        myImageLink = myImage.ItemLink
                        Dim msgRet As MsgBoxResult = MsgBox("Would you like to relink selected image?", MsgBoxStyle.YesNoCancel, "Relink seleceted image?")
                        If msgRet = MsgBoxResult.Yes Then
                                    ' DO some action
                                    Dim MediaLink As String = something...
                                            'CheckOut action
                                            If myCheckOutMenu.AssociatedMenuAction.Enabled() Then
                                                myCheckOutMenu.AssociatedMenuAction.Invoke()
                                            End If
                                            myImageLink.Relink(fileLink)
                                            Try
                                                myImageLink.Update()
                                            Catch
                                            End Try
Hope this helps.
Regards,
Marko

Similar Messages

  • How to find out the RasterItem(embedded) links name?

    How to find out the RasterItem(embedded) links name which appeared in Links menu(Window->Links) via scripting for illustrator cs3. Please advise me the possibilities.
    Thanks for looking into this.

    Thanks for your support. From your code i got the filename(embedded) with pathname(if the embedded image in that location). If the embedded image not in that location at that time it throws error message. Is it possible to find out the name of the embedded image, if the corresponding image not in that location. Kindly advise me the possiblitities.
    Thanks for looking into this.

  • How to find out web content files linked in folio through scripting

    Hi all,
    Please suggest me, how to find out web content files linked in folio through scripting.
    Regards,
    Moorthy

    @Moorthy – can you tell us a bit more? By mentioning "folio", I think you are referring to Adobe Digitial Publishing Suite (ADPS or short: DPS). If yes:
    1. Do you want to analyze Folio files *.folio and get the linked web content files?
    2. Or do you want to check an InDesign file with an overlay and check what files are linked as web content?
    3. Or something else?
    Where is your base problem?
    Packaging the InDesign files and copy/relinking the web content files after the packaging process?
    Uwe

  • How to find out the batch class link of the batch record in the MSC3N

    Hi,
    I would like to know how to pull out the class type and the characteristic value for a batch which is found in MSC3N.
    For example, the following is MSC3N screen showing material (INM000000001724945) and batch (A000001117) tie to batch class “XXXXXXXX”.
    Hence, I would like to know:
    How to pull out the class type and the characteristic value for a batch record which is found in MSC3N? What are the table? The table show in the F1 key is not a table.
    There are two batch classes setup in the system “XXXXXXX” and “YYYYYYY”, my question is why system decides to use the batch class “XXXXXXX”? Where is the system setup to determine this?
    Thanks
    Tuff

    Hi
    The table MCH1 keeps the information about Material, Batch and Internal object no.: Batch classification (CUOBJ_BM).
    The field CUOBJ_BM in MCHA represent the 'Key of object to be classified' (AUSP-OBJEK). The first 18 characters of AUSP-OBJEK.
    In CABN (Characteristic) the field ATINN and ATNAM is important. The link between CABN and AUSP is through ATINN.

  • How to find out which documents are linked to a graphic

    We're in the process of cleaning up our network drive by moving relevant files to a new drive and deleting duplicate or other unnecessary files. We have a lot of files and it would not be practical to do this migration in mass so we would like to do it piecemeal, deleting files as they are migrated to the new drive.
    In the past, if a graphic file was used in multiple documents, we would link the documents to the graphic, wherever the graphic was first stored (which has cause many problems). Moving forward we want to keep all the graphic files with the document that uses them (even though that will create multiple copies of the same file).
    My concern is that a graphic file in one folder may be linked to multiple documents and if we delete that graphic, when it comes time to migrate the other linked documents, it will be cumbersome to track down the missing graphic.
    Does anyone know an easy way to identify all of the documents that are linked to a graphic? Is there a Where Used script for graphics or something?
    We are using FrameMaker 8 on Windows XP Professional.
    Thanks,
    Tim

    I know of a Perl script that separates used from unused graphics: http://members.shaw.ca/philip.sharman/graphix/graphix.htm
    You will also need a Perl environment.
    We've tested this script with Strawberry Perl: http://strawberryperl.com/
    It is working, but you need to map network drives. It doesn't work with UNC paths.
    HTH
    Susanne

  • How to find out the link for the tables for sub contract PO

    Dear All,
    How to find out the link for the tables for sub contract PO, I am looking for the fields Material, Unit, Batch no., quantity.
    Please provide the solution for the Table related to ABAP.
    Thanks,
    V.V.

    Hi,
       Make use of the table EKKO, EKPO...
    For subcontract please select the option in EKPO-PSTYP.
    Regards
    GK.

  • How to find out the selected column in Table Control

    Hi all,
          How to find out the selected column in Table Control?
    Thanks & Regards,
    YJR

    Hi,
    Let your table control name in Screen painter be TC1.
    READ TABLE TC1-COLS INTO WA_COLS (some wok area)
                 WITH KEY SELECTED = 'X'.
            IF SY-SUBRC = 0.
              CLEAR: W_DUMMY, W_COL_NAME.
              SPLIT WA_COLS-SCREEN-NAME AT '-' INTO W_DUMMY
                                                   W_COL_NAME.
            endif.
    W_COL_NAME gives you the column name.
    Hope it helps.
    cheers
    sharmistha

  • How to find out  the selected line in list

    Hi all,
    Can any one tell me how to find out the selected event in the list

    Your subject said 'selected <b>line</b> in list' and your description says 'selected <b>event</b> in the list'. Which one is it you want to know?
    For line you will use the event AT LINE-SELECTION and for event you will use AT USER-COMMAND.
    Please reward and close if answered, if not, please revert back to the forum with more details.
    Thanks,
    Srinivas

  • How to find out if JTable's selected row is visible?

    Hello there,
    Given:
    a JTable is inserted into a JScrollPane and the number of rows in the table is greater than the vieport size.
    A random row within the table gets programmatically selected.
    How to find out if the selected row is visible in a JTable visible area?
    Your help will be greatly appreciated.
    Tim

    That will make the row visible, but not answer whether it was visible
    in the first place. Try something like:
    public boolean isRowVisible( JTable table, int row ) {
        Rectangle rect = table.getBounds();
        int rowHeight = table.getRowHeight();
        int viewHeight = table.getParent().getHeight();
        int max = rect.y - viewHeight + 1;
        int rowPos = - rowHeight * row;
        return ( rect.y >= rowPos && rowPos > max );
    }assuming all rows have the same height.
    : jay

  • How to find out the selected item in the lsit

    Hi all,
    How to find out the selected item in the list,can any please post some examples which easy to understand,because iam not a good programmer

    This sample program uses a checkbox as selection,  you could also use a HOTSPOT.
    report zrich_0002 no standard page heading.
    data: imara type table of mara with header line.
    data: check_box(1) type c,  
       report_lines type i.
    start-of-selection.
    * Create the gui status with BACK button in standard place
    * and a READ button in the application toolbar
      set pf-status 'CHECK'. 
    select * into corresponding fields of table imara           from mara up to 100 rows.
    loop at imara.   
    write:/ check_box as checkbox, imara-matnr, imara-matkl.  
    hide imara-matnr. 
    endloop.
      report_lines  = sy-linno - 1.
    top-of-page. 
    write: 'List of materials'.  uline.
    top-of-page during line-selection.  write:  'Material.....'.  uline.
    at user-command. 
    case sy-ucomm.  
    when 'READ'.   
      check_box = space.    
    set pf-status 'CHECK' excluding 'READ'.
          do report_lines times.       
    read line sy-index field value check_box.    
       if check_box = 'X'.        
    write:/  'You have selected material',
    imara-matnr.       
    endif.   
      enddo. 
    endcase.
    Regards,
    Rich Heilman

  • Forgot where I linked to save Screenshots on Mac, How to find out?

    Forgot where I linked to save Screenshots on Mac, How to find out?
    hi,
    I have changed the location (default was on desktop) to save the screenshots on Mac (software: MAC OSX Version 10.7.3). But, I forgot where was it linked to (the new location). Is there any way to find out the location? If not, how to delete away those files by recent screenshots. (I use CTRL + COMMAND + SHIFT + F3) to take it. Please help me with this. Thanks a lot.

    >I use CTRL + COMMAND + SHIFT + F3
    If you are using ctrl-command-shift-3, then the screenshots are going to your clipboard and are not saved elsewhere. (I don't know about using F3 instead of 3)
    If you are using command-shift-3, then the screenshots do get saved, with the default location being the Desktop. To look for the current location, download and run TinkerTool, and look in its General tab. You can use that section to alter the screenshot location; it may also tell you the current location even if it had been altered by another method.

  • How do I find out what devices are linked to my account

    How do I find out what devices are linked or registered to my account or apple Id?

    http://support.apple.com/kb/ht4627

  • How to find out which keywords were used to create a smart album?

    Hi,
    I actually have 2 questions;
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Thanks guys,
    Raphael
    <Edited by Host>

    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Raphael,
    that message may occur for four reasons at least:
    Most frequently, when you are using an outdated link to a post that no longer exists, for example from an email notofication. Sometimes our community host will remove posts, that are in violation of the terms of use: see:
    Apple Support Communities Terms of Use
    Or you are using the edit button or a bookmark to an "Edit" window, after the fifteen minutes allowed for editing are up.
    Or you want to view a page in a restricted section of the ASC - soem perta are only open for members of level 6 or higher.
    Or it is one  of the unexplained problems with the forum software right now.
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    I really like Kirby's suggestion with the IPTC rule Keyword is. This is very useful for smart albums global to the library.
    Frequently a different approach helps for my smart albums. Many of my smart albums are local to projects or folders.  In this case the smart HUD will only show those keywords that have been used for the images in the selection. So if I only have tagged the images with the keywords "birds" and "slideshow", the smart settings HUD will only show these two keywords and the list is very short.
    My Keywords HUD, is organized hierarchically; this way I can collapse large sections at once, and it is easier to focus on the keywords needed for a specific task.
    I use the search field in HUD a lot, to filter the set of keywords shown.

  • Get "404 Not Found" after deployment.  How to find out correct URL?

    To the experienced:
    In preparing to deploy my application, I am using JDeveloper 10.1.3.4 to deploy the application to the standalone oc4j server that is included in JDeveloper. After the deployment, I get the "404 Not Found" error when trying to invoke the application in a browser. The deployment looks OK, becasue the log window in JDeveloper showed no error when running deployment from inside JDeveloper. Therefore I guess the question is how to find out the correct URL to invoke the application. The steps I took in doing the deployment are as follows.
    I first installed the standalone oc4j by running the <jdev_home>\jdev\bin\start_oc4j .bat file. The installation is OK because I deployed the SRTutorial applcation and invoked it in a browser successfully.
    The WAR file was created by right-clicking the ViewController project and select to create a WAR file. To the application's Context Root its own name, I typed "ZB" in the box for the context root.
    Then in ViewController -> Resources, right_click the deployment file (ZBOV.deploy) and chose "Deploy to" the local_standalone_oc4j. The messages in JDeveloper's log window for the deployment are all clean without errors.
    I then used this url to invoke the deployed application in a browser:
    http://localhost:8888/ZB/faces/staff/login.jspx
    But I got an "404 Not Found" error. Right away I tried invoking the SRTutorial application, and it runs fine.
    login.jspx is one of the pages for the appllication. In the application navigator, it is located with other files in the ViewController/Web Content/staff folder, therefore I used /staff/login.jspx after ZB/faces.
    What could be wrong? If the deployment is actually successful, how to find out the correct url to invoke the application?
    Many thanks for your help!
    Newman

    Hi, Arun,
    Thank you for the suggestion. I tried it but got the same error.
    I tried it by first undeploying the application using the enterprise manager page (which is also part of the oc4j included in JDeveloper). I select the application and clicked the undeploy link, confirmed that I wanted to remove it. And it was removed.
    Then in JDeveloper, I right-clicked the ViewController, and in the properties of the probject selected "J2EE Application" and then selected "Use Custom Settings", then in the "J2EE Web Context Root" box I entered "ZB". Created the deployment profile again, overwriting the existing one, and then right-clicked the ZB.deploy node to deploy to the standalone oc4j on the localhost. And I used the url:
    http://localhost:8888/ZB/faces/staff/login.jspx
    And I got the same "404 Not Found" error.
    There was no error at the time of deployment using the ZB.deploy profile. On the enterprise manager page, the path of the deployed application is given as /C:/jdev10134/j2ee/home/applications/ZB.ear, and the folder of the deployed application is there. Question is: if the deployment is actually OK, can the correct URL be found in some file somewhere in the folder?
    All ideas and suggestions are very much appreciated!
    Newman

  • How to find out the user-exits?

    hi.
    how to find out the user-exits?
    regards
    eswar.

    Hi,
    *& Report  ZEXITFINDER
    *report  zexitfinder.
    *& Enter the transaction code that you want to search through in order
    *& to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
    select single * from tstc
    where tcode eq p_tcode.
    Find Repository Objects for transaction code
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    select single * from enlfdir
    where funcname = tfdir-funcname.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name = enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    Find SAP Modifactions
    select * from tadir
    into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    Regards

Maybe you are looking for

  • Error message when opening Encore

    Hi there.  I have been working with CS5 just fine for several weeks now and have burned several different projects without issues.  However, when I opened up Encore this morning to start building a DVD, I got this message: Adobe Encore.exe - No Disk.

  • Adobe muse CC crashes while working

    When ever I'm using Muse CC it seems to crash when loading files in from Photoshop. I keep getting the error: "Adobe Muse CC has encountered an error and will now exit. Please report the last few actions you took leading up to this error to the Adobe

  • How do I delete large amounts of photos from my ipad?

    a

  • SGA_MAX_SIZE limitations in Oracle 9i

    Hello everyone, I did oracle 9.2.0.4 installation on RHEL4 and created one database. I was editing init parameters depending upon our database requirements. while setting parameter SGA_MAX_SIZE=2.5GB i got an error regarding "Shared Memory Segment" a

  • Convert PL/SQL block returning html to a plugin - render function

    I have a PL/SQL region that uses htp.p('...') to output HTML. It's dynamic in that it uses a page value to call data from the database. I'd like this region to appear on every page in my application, but also to have the ability to update it once rat