How to open a specific Librarian document revision using automation? Follow

Jasper Wen


Is there a way through automation to open a Librarian document revision number such as using BarTender XML or BarTender .net SDK?



Here is a some simple Print API code:

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


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.


Please sign in to leave a comment.