[CS5.5] How to import a snippet into the current page

Hi All,
I got the IDOMElement from the document UIDRef and imported the snippet into it. Here's the code-
InterfacePtr<IDOMElement> documentElement(docRef, UseDefaultIID());
if (documentElement == NULL)
    break;
if ((status = Utils<ISnippetImport>()->ImportFromStream(tStream, documentElement)) == kSuccess)
    //success
( tStream is the IPMStream of the snippet I'm importing)
This code above is able to import the snippet successfully to the first page of the active document, but I want it to be imported in the current active page instead. So for this, I tried getting the IDOMElement from the current page's UIDRef instead (logically I thought that this will import the snippet to the current page)-
InterfacePtr<IDOMElement> documentElement(currentPageUIDRef, UseDefaultIID());
But the result is just the same— the documentElement is not null, but the snippet is imported to the first page only.
May be that the concept of IDOMElement is not clear to me, but I cant find any documentation of it in the SDK guides too. Can anyone explain to me what's an IDOMElement and how can I import a snippet to the current page?
Any help will be highly appreciated. Thanks.

@mfreitag, thanks a lot for your reply.
I havent tried it yet, will let you know after I try it- but I want to ask that how will that help me placing elements to the page?   Can you please elaborate a bit.
Actually in CS3, I used to follow this implementation to place the snippet into the current page-
1. Create a dummy textframe in the current page (needed just to create a group).
2. Create a Group using that dummy frame.
3. Get the IDOMElement of the UIDRef of that group-
   InterfacePtr<IDOMElement> documentElement(groupUIDRef, UseDefaultIID());
4. Import snippet to this DOM Element
5. Delete the dummy frame
The snippet items were added into the group beautifully in the active page. But when I was porting the plugin to CS5.5, steps after step-3 failed, and the snippet is imported to the 1st page/spread of the document.
I'm not sure, but seems that things related to IDomElement are changed for CS3+. May be you have an idea whether I could use the similar implementation to get this thing work?

Similar Messages

  • [CS5.5] How to import a snippet into the specific page

    Hi,
    I've a snippet file that export from page index 1 but I want to import back to page index 0, and vice versa.
    Is that possible?
    Regard,
    Nat.

    @mfreitag, thanks a lot for your reply.
    I havent tried it yet, will let you know after I try it- but I want to ask that how will that help me placing elements to the page?   Can you please elaborate a bit.
    Actually in CS3, I used to follow this implementation to place the snippet into the current page-
    1. Create a dummy textframe in the current page (needed just to create a group).
    2. Create a Group using that dummy frame.
    3. Get the IDOMElement of the UIDRef of that group-
       InterfacePtr<IDOMElement> documentElement(groupUIDRef, UseDefaultIID());
    4. Import snippet to this DOM Element
    5. Delete the dummy frame
    The snippet items were added into the group beautifully in the active page. But when I was porting the plugin to CS5.5, steps after step-3 failed, and the snippet is imported to the 1st page/spread of the document.
    I'm not sure, but seems that things related to IDomElement are changed for CS3+. May be you have an idea whether I could use the similar implementation to get this thing work?

  • How much RAM is built into the current Airport Extreme?

    How much RAM is built into the current Airport Extreme (5th Gen)?

    The only RAM that's likely onboard is whateve is used by the hardware and would be soldered to the board. One would need to disassemble it in order to determine what if any RAM is on the board. There is no user-accessible RAM.

  • How to import a schema into the Oracle Database -

    Hi
    I have downloaded schema (spatial MVDemo schema) from oracle. To implement a functionality in obiee 11g i need to import the downloaded schema in to Oracle database.
    some one please give me step by step commands to acheve the same by using sql plus.
    Please let me know if you need any information.
    TIA.
    Regards

    Pl post exact OS and database versions, along with a link to where you downloaded this demo from. Did that link not provide any details on how to import ?
    HTH
    Srini

  • How to import iPhoto Library into the new Photo app

    Hello so, my Mac just updated to the new Photo app. but how to I get my iPhoto Library over? I didn't get the option to import my iphoto library over there. it is really annoying me, since I dont want to use the new app before I know to import over.

    You don't import, you just open the library with the new app.
    Hold down the option (or alt) key key and launch Photos. From the resulting menu select 'Choose Library'

  • How to import multiple elements into the same line in structure Framemaker (i.e. no carriage return between elements).

    I have a successful import process going now (DTD, EDD, ReadWriteRules, and Template) that imports a number of elements, but each onto a separate line. I now need to import three elements in a row on a single line. How do I set up to do that?

    Dear Wild,
    A container element a structured document can either be a paragraph element, that contains one or more complete FrameMaker paragraphs (elements corresponding to chapters, titles, and list items, for instance, are typically paragraph elements), or a text range element, with content that comprises part of a paragraph. An EDD doesn't need to identify paragraph elements since containers are paragraphs by default. You make an element a text range with a text format rule that specifies TextRangeFormatting.
    In your case, if you have a wrapper element that contains the three elements you want to appear on a single line, in the EDD, add a text format rule for the three inline elements that specifies TextRangeFormatting; specify the formatting of the overall paragraph in the element definition for the wrapper. If you don't have a wrapper, though, the overall paragraph will inherit formatting from whatever the containing element is; the containing element may be the document's root element or a major division such as a chapter or section. If that element's formatting is not what you want here, you can leave the "inline" elements as separate paragraph so that you can specify their formatting, but make the first two run-in heads (which is done in the Placement property of the pagination properties).
    --Lynne

  • How to import video file into the stage?

    I did follow the instructions on Adobe help site, but when I'm trying the import menu and brows to the file (xxxx.mp4) location I find it "gray" (dimmed). What's wrong?

    What Captivate version are you using? How exactly are you trying to insert the video? I know you said "I did follow the instructions on Adobe help site but when I'm trying the import menu." I'm a bit confused because you don't add video via the Import menu. At least, you don't do it this way if you have a generic video you want to include. If that's what you need, try clicking the Video menu and choosing Insert Video.
    I'm wondering if you are trying the "CPVC" slide thing. And that's for importing a "CaPtivate Videeo Capture" that you used Captivate to create.
    Cheers... Rick

  • How can I drag pictures into the new Pages so that they are inline where I release the drag?

    Back in the day, like last week, I could drag in a picture and if I was holding command when I let go, the image was inlined exactly where I released.  Now that functionality seems to be gone - or maybe I just don't understand how to access it.

    Thank you. That worked. I was able to open 1 window with multiple tabs. Thanks cor-el!

  • How to get functionID/Name of the current page

    Hi guys,
    I have two EBS standard forms "Supplier Entry" and "Supplier View Only" defined as two separate functions in the menu. Depending on which function was launched by the user I have to do some extension.
    I found that following code can be used to know whether function is available in the menu or not. But the problem occurs in situation where both functions are available to the user and since the logic fail.
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    boolean isFunc1 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME1"));
    I need to know specifically which function was used to launch the form.
    On the following post https://forums.oracle.com/message/10468620#10468620 Parag tell something like this
    ( "IMC_NG_ORG_CONTACTS".equals(pageContext.getParameter("ImcLandingFunction"))
    but I don't know what  "ImcLandingFunction" equates to in my scenario. I don't see AOL functions passing any parameters to forms.
    or is there any other method to know?
    Can anyone help?

    did you try these ones ? :
       pageContext.getFormSubmitName();
       pageContext.getFunctionId();

  • How to import multiple files to the frame area?

    How do I import multiple files to create animated GIF's. I
    know how to import multiple files into the Fireworks, but if I'm
    trying to create an animated gif that has alot of files, How do I
    get them into the frames area. It is really a pain importing each
    and every file one at a time frame by frame

    merry1
    after you bring in all your images to the canvas, select all
    and in the
    Frames Options drop down, select Distribute to Frames.
    You can bring multiple images onto the canvas by copy and
    pasting from
    the folder(s) where they exist.
    alex
    merry1 wrote:
    > How do I import multiple files to create animated GIF's.
    I know how to import
    > multiple files into the Fireworks, but if I'm trying to
    create an animated gif
    > that has alot of files, How do I get them into the
    frames area. It is really a
    > pain importing each and every file one at a time frame
    by frame
    >

  • How to determine if the current page is a "Community Knowledge Directory"

    I am creating a new Navigation Scheme and I was wondering if anybody has figure out how to test to see if the current page the user is on is a "Community Knowledge Directory" page or not. What I am trying to do is display a different background color when the user lands on a page in a horizontal tab navigation. I've noticed that there is a control=SetSiteMap in URL when ever the user lands on the Community Knowledge Directory. Is that what I should be checking for?

    I am creating a new Navigation Scheme and I was wondering if anybody has figure out how to test to see if the current page the user is on is a "Community Knowledge Directory" page or not. What I am trying to do is display a different background color when the user lands on a page in a horizontal tab navigation. I've noticed that there is a control=SetSiteMap in URL when ever the user lands on the Community Knowledge Directory. Is that what I should be checking for?

  • I have just used migration assistant to import photos (using an ethernet cable) from my PC. It has worked but they have gone into a new user on my MacPro. How can I merge them into the one user account.

    I have just used migration assistant to import photos (using an ethernet cable) from my PC. It has worked but they have gone into a new user on my MacPro. How can I merge them into the one user account.

    How many pictures (or how many bytes) are we talking?  Now that the pictures are imported one way to cross users is to use a removable drive (although large volumes of files preclude this).
    The other is to login as the user where the pictures are, then copy them into the public drop box of the user where you want the picture.
    The arrow is showing (in ths example) copy files from the Pictures folder for my user to the guest user accounts public dropbox.  When you do this you may have to authenticate and you won't be able to see the results of the copy until you log in as the other user.
    All users are in the folder "/Users/"

  • How to import .pdf files into iBooks?

    How to import .pdf files into iBooks?

    Or send the file from your computer to your ipod by emailing yourself the pdf. Then if you open the Mail client and you open the pdf there is an option to select open in ibooks. It will save it to your device for remote viewing.

  • How to import epub/pdf into macvericks' ibooks ?

    how to import epub/pdf into macvericks' ibooks ?

    Placing the PDF into an InDesign document shouldn't be a problem, but if it is, please post back. What I think you're asking for is how to edit a PDF with InDesign, which can't be done. You would need the source document, edit that and then export to another PDF (if PDF is the end goal). There are some programs that can edit PDFs or convert PDFs to other formats (Word, InDesign, etc.), and they will work to one extent or another. You should expect to have to rework parts of it should you go that way. Keep in mind that PDF is generally considered a final document that isn't intended to be edited.

  • How to import csv data into Oracle using c#

    Hello,
    How to import csv data into Oracle using c #. Where data to be imported 3GB in size and number of rows 7512263. I've managed to import csv data into Oracle, but the time it takes about 1 hour. How to speed up the time it takes to import csv data into oracle. Thank you.
    This is my code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.Threading;
    using System.Text.RegularExpressions;
    using System.IO;
    using FileHelpers;
    using System.Data.OracleClient;
    namespace sqlloader
    class Program
    static void Main(string[] args)
    int jum;
    int i;
    bool isFirstLine = false;
    FileHelperEngine engine = new FileHelperEngine(typeof(XL_XDR));
    //Connect To Database
    string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST="
    + "(ADDRESS=(PROTOCOL=TCP)(HOST= pt-9a84825594af )(PORT=1521 )))"
    + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=o11g)));"
    + "User Id=xl;Password=rahasia;";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
    // To Read Use:
    XL_XDR[] res = engine.ReadFile("DataOut.csv") as XL_XDR[];
    jum = CountLinesInFile("DataOut.csv");
    FileInfo f2 = new FileInfo("DataOut.csv");
    long s2 = f2.Length;
    int jmlRecord = jum - 1;
    for (i = 0; i < jum; i++)
    ShowPercentProgress("Processing...", i, jum);
    Thread.Sleep(100);
    if (isFirstLine == false)
    isFirstLine = true;
    else
    string sql = "INSERT INTO XL_XDR (XDR_ID, XDR_TYPE, SESSION_START_TIME, SESSION_END_TIME, SESSION_LAST_UPDATE_TIME, " +
    "SESSION_FLAG, VERSION, CONNECTION_ROW_COUNT, ERROR_CODE, METHOD, HOST_LEN, HOST, URL_LEN, URL, CONNECTION_START_TIME, " +
    "CONNECTION_LAST_UPDATE_TIME, CONNECTION_FLAG, CONNECTION_ID, TOTAL_EVENT_COUNT, TUNNEL_PAIR_ID, RESPONSIVENESS_TYPE, " +
    "CLIENT_PORT, PAYLOAD_TYPE, VIRTUAL_TYPE, VID_CLIENT, VID_SERVER, CLIENT_ADDR, SERVER_ADDR, CLIENT_TUNNEL_ADDR, " +
    "SERVER_TUNNEL_ADDR, ERROR_CODE_2, IPID, C2S_PKTS, C2S_OCTETS, S2C_PKTS, S2C_OCTETS, NUM_SUCC_TRANS, CONNECT_TIME, " +
    "TOTAL_RESP, TIMEOUTS, RETRIES, RAI, TCP_SYNS, TCP_SYN_ACKS, TCP_SYN_RESETS, TCP_SYN_FINS, EVENT_TYPE, FLAGS, TIME_STAMP, " +
    "EVENT_ID, EVENT_CODE) VALUES (" +
    "'" + res.XDR_ID + "', '" + res[i].XDR_TYPE + "', '" + res[i].SESSION_START_TIME + "', '" + res[i].SESSION_END_TIME + "', " +
    "'" + res[i].SESSION_LAST_UPDATE_TIME + "', '" + res[i].SESSION_FLAG + "', '" + res[i].VERSION + "', '" + res[i].CONNECTION_ROW_COUNT + "', " +
    "'" + res[i].ERROR_CODE + "', '" + res[i].METHOD + "', '" + res[i].HOST_LEN + "', '" + res[i].HOST + "', " +
    "'" + res[i].URL_LEN + "', '" + res[i].URL + "', '" + res[i].CONNECTION_START_TIME + "', '" + res[i].CONNECTION_LAST_UPDATE_TIME + "', " +
    "'" + res[i].CONNECTION_FLAG + "', '" + res[i].CONNECTION_ID + "', '" + res[i].TOTAL_EVENT_COUNT + "', '" + res[i].TUNNEL_PAIR_ID + "', " +
    "'" + res[i].RESPONSIVENESS_TYPE + "', '" + res[i].CLIENT_PORT + "', '" + res[i].PAYLOAD_TYPE + "', '" + res[i].VIRTUAL_TYPE + "', " +
    "'" + res[i].VID_CLIENT + "', '" + res[i].VID_SERVER + "', '" + res[i].CLIENT_ADDR + "', '" + res[i].SERVER_ADDR + "', " +
    "'" + res[i].CLIENT_TUNNEL_ADDR + "', '" + res[i].SERVER_TUNNEL_ADDR + "', '" + res[i].ERROR_CODE_2 + "', '" + res[i].IPID + "', " +
    "'" + res[i].C2S_PKTS + "', '" + res[i].C2S_OCTETS + "', '" + res[i].S2C_PKTS + "', '" + res[i].S2C_OCTETS + "', " +
    "'" + res[i].NUM_SUCC_TRANS + "', '" + res[i].CONNECT_TIME + "', '" + res[i].TOTAL_RESP + "', '" + res[i].TIMEOUTS + "', " +
    "'" + res[i].RETRIES + "', '" + res[i].RAI + "', '" + res[i].TCP_SYNS + "', '" + res[i].TCP_SYN_ACKS + "', " +
    "'" + res[i].TCP_SYN_RESETS + "', '" + res[i].TCP_SYN_FINS + "', '" + res[i].EVENT_TYPE + "', '" + res[i].FLAGS + "', " +
    "'" + res[i].TIME_STAMP + "', '" + res[i].EVENT_ID + "', '" + res[i].EVENT_CODE + "')";
    OracleCommand command = new OracleCommand(sql, con);
    command.ExecuteNonQuery();
    Console.WriteLine("Successfully Inserted");
    Console.WriteLine();
    Console.WriteLine("Number of Row Data: " + jmlRecord.ToString());
    Console.WriteLine();
    Console.WriteLine("The size of {0} is {1} bytes.", f2.Name, f2.Length);
    con.Close();
    static void ShowPercentProgress(string message, int currElementIndex, int totalElementCount)
    if (currElementIndex < 0 || currElementIndex >= totalElementCount)
    throw new InvalidOperationException("currElement out of range");
    int percent = (100 * (currElementIndex + 1)) / totalElementCount;
    Console.Write("\r{0}{1}% complete", message, percent);
    if (currElementIndex == totalElementCount - 1)
    Console.WriteLine(Environment.NewLine);
    static int CountLinesInFile(string f)
    int count = 0;
    using (StreamReader r = new StreamReader(f))
    string line;
    while ((line = r.ReadLine()) != null)
    count++;
    return count;
    [DelimitedRecord(",")]
    public class XL_XDR
    public string XDR_ID;
    public string XDR_TYPE;
    public string SESSION_START_TIME;
    public string SESSION_END_TIME;
    public string SESSION_LAST_UPDATE_TIME;
    public string SESSION_FLAG;
    public string VERSION;
    public string CONNECTION_ROW_COUNT;
    public string ERROR_CODE;
    public string METHOD;
    public string HOST_LEN;
    public string HOST;
    public string URL_LEN;
    public string URL;
    public string CONNECTION_START_TIME;
    public string CONNECTION_LAST_UPDATE_TIME;
    public string CONNECTION_FLAG;
    public string CONNECTION_ID;
    public string TOTAL_EVENT_COUNT;
    public string TUNNEL_PAIR_ID;
    public string RESPONSIVENESS_TYPE;
    public string CLIENT_PORT;
    public string PAYLOAD_TYPE;
    public string VIRTUAL_TYPE;
    public string VID_CLIENT;
    public string VID_SERVER;
    public string CLIENT_ADDR;
    public string SERVER_ADDR;
    public string CLIENT_TUNNEL_ADDR;
    public string SERVER_TUNNEL_ADDR;
    public string ERROR_CODE_2;
    public string IPID;
    public string C2S_PKTS;
    public string C2S_OCTETS;
    public string S2C_PKTS;
    public string S2C_OCTETS;
    public string NUM_SUCC_TRANS;
    public string CONNECT_TIME;
    public string TOTAL_RESP;
    public string TIMEOUTS;
    public string RETRIES;
    public string RAI;
    public string TCP_SYNS;
    public string TCP_SYN_ACKS;
    public string TCP_SYN_RESETS;
    public string TCP_SYN_FINS;
    public string EVENT_TYPE;
    public string FLAGS;
    public string TIME_STAMP;
    public string EVENT_ID;
    public string EVENT_CODE;
    I hope someone can give me a solution. Thanks

    The fastest way is to use external tables or sql loader (sqlldr). (If you use external tables or sql loader, you don't use C# at all).

Maybe you are looking for

  • Reg:FCC to ignore the last field name

    Hi...    I am using FCC in the reciver file adapter. the output structure is like 94,ESSAR,,,,,,,D,0000100226,10000,12/13/1 KURLA EAST,MUMBAI,,400025,006398765432,,2009-03-24 00:00:00.0,0000100226,20202789,,,,SUCCESS,, /home/corpuser/Disbursement/DD

  • MBP 13" womens case needed any ideas?

    it's for a gift for my wife... I was going to get a simple silicone case but I realized we travel a lot and she would need something she can carry with shoulder strap or handle..., the typical black leather cases are too masculine... Anyone have any

  • Oracle 10g performance tuning tools

    hi, can anyone please suggest me any oracle database tuning tool to use for improving the performance of the database?(oracle 10g)

  • IPhoto book not correctly printed.

    Two books ordered last week just arrived. Apparently on a random basis, pictures are missing and I have around 15 white pages (only some photo captions appearing). Within iPhoto (latest version) everything looks fine. Ordering process went smoothly a

  • Thawte code signing certificate problem

    Hi everyone! I wonder if someone here could help me out a little bit? I just received a code signing certificate from Thawte, but nobody mentioned that I should have enrolled it with Firefox (I have mac). So I used my default browser Safari. And now