Skip to main content

Search

Search

Obtain a label format with a specific revision

Comments

2 comments

  • Avatar
    Jasper Wen
    Moderator

    I have included some sample code using our BarTender .net SDK and information on how you can do this.

    using (Engine engine = new Engine())
    {
    engine.Start();
    LabelFormatDocument doc = engine.Documents.Open(@"lib://Test/MyDoc.btw?r3", "Zebra LP2844");
    doc.Print();
    }

    Notice the "?r3" at the end of the librarian file path. This is an example on how to open a specific revision.

    Here are the general rules for specifying librarian path options delimited by the "?" character.

    Example Meaning
    lib://Test/MyDoc.btw Get latest published revision or latest revision if no workflows.
    lib://Test/MyDoc.btw?l Get latest/head revision (it is an lower case "L" not a 1.)
    lib://Test/MyDoc.btw?4 Get revision 4
    lib://Test/MyDoc.btw?r4 Get revision 4
    lib://Test/MyDoc.btw?9-16-07 4:25 PM Get a revision based on a date time

    *Note that these rules apply to the .NET SDK, BTXML, and the Integration platform.

    1
  • Avatar
    Florian Trudelle

    Thank you for your help, it help a lot. Have a nice day !

    0

Please sign in to leave a comment.