Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex 35 posts 55 karma points
    Oct 18, 2010 @ 05:17
    Alex
    0

    Copying nodes programmatically

    We can copy a node with all its child nodes from the context menu by clicking the Copy menu item.

    Is it possible to do the same (copy a node and all its children) from C# code?

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Oct 18, 2010 @ 09:39
    Richard Soeteman
    1

    HI Alex,

    Yes you can.

    First create an instance of the document you want to move.

    Document 

     

    doc = new Document( the id of the document you want to move);

    Then you can copy it.ou can even add a relation to the original document just as you can fro the GUI

    doc.Copy( your parent document id  as integer ,

    new User(0), relate to original true/false);

    Hope this helps you,

    Richard

  • Alex 35 posts 55 karma points
    Oct 18, 2010 @ 09:42
    Alex
    0

    Will doc.Copy(...) also copy all its children?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 18, 2010 @ 09:43
    Morten Bock
    0

    Yes, it will.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies