Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

livelink 9.7 c# sample to extract documents to folder path and metadata to excel sheet

Status
Not open for further replies.

snowcap

Programmer
Feb 6, 2017
6
AE
Hello,

Sorry can somebody share the source code for a sample application in c# that loop through folders and download documents and metadata

Knowing that is no longer available.

Thanks
 
In my blog I have some samples.I was a frequent contributor to communities If you have access to KB then Upload/download code and metadata is shown there.I believe that is the only hard part of this because generating excel or csv shouldn't be a problem.If you do not want to write any code gather all files/folders you want through search and add them to a 'Collection' Object then you can use the Collection command to export it as CSV.In many companies Collection and additional commands are restricted but if you do it as the user 'Admin or any user with 'SA" on the profile you can get it.You can even do 'Make Disk Image' and burn the collection to disc.It may not be as clean as a custom program but a generic request handler.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thx appnair,however I don't have access to KB.
 
So try to get a simple free account at developer.opentext.com it has REST API documentation and I am sure you can use javascript to do it.Proper IP of OT and decorum in this forum dictate I cannot share OT proprietary code although if you know how to configure either TC or IIS to expose the WSDL then you can use any dev client like C# and write SOAP code.SOAPUI freebie is a good helping tool as well.Why do you want to do this with code if you do not have access to developer material? AFAIK the SDK also is covered as IP of OT.You will only find bits,pieces and snippets of Livelink code in public forums.Most of us contribute because some times many people stumble on some idiosyncratic aspects of the software.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
This is what I have found so far,am not sure it is correct and am still missing fetching the metadata.

Code:
LLSession session;
            LAPI_DOCUMENTS doc;//library object
            LAPI_WORKFLOW flow;//workflow object
            LLValue value = new LLValue();
            session = new LLSession(Server, Port, DFT, User, Pass);
            doc = new LAPI_DOCUMENTS(session);
            flow = new LAPI_WORKFLOW(session);
            LLValue LLvalueWP = new LLValue();
            int volID, objID, versionID;
            if (doc.AccessEnterpriseWS(value) == 0)
            {
                //  System.out.println("Enterprise accessed");
                objID = value.toInteger("ID");
                volID = value.toInteger("VolumeID");
                // System.out.println("Enterprise ID: " + objID);
                // System.out.println("Enterprise Volume: " + volID);

                //PROVIDE a livelink Document with category that one is looking for
                objID = 11351;
                LLValue children = new LLValue();
                String viewName = "DTREE";
                String queryStr = "SUBTYPE=144 ";
                if (doc.ListObjects(volID, objID, viewName, queryStr, LAPI_DOCUMENTS.PERM_FULL, children) == 0)
                {
                   
                    for (int i = 0; i < children.toValue("NAME").size(); i++)
                    {
                     
                    }

                }
               




            }
 
What you have written in Livelink API or called LAPI code,if this works against a livelink server,then you are not using SOAP as in WSDL.You are actually writing in a 10 yr old deprecated language which OT will not support.
To find metadata using that code again you would need a view against Dtree and LLAttrdata where the attribute information is.I don't recommend you trying to work thru lapi quirks but if that is the only thing you have try on your own. LAPI will not work against LES server 16.0.

BTW if your intent is just finding that info for a spreadsheet you do not need LAPI,WSAPI(SOAP) or REST Api because that info can be just found out by joining livelink core tables. Again if you ask how does one get access to all the tables it is better left to you talking to the livelink administrator or organization that is asking you to do this. Beleive me getting meatadat through livelink tables is very easily documented in the KB where you don't have access.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thx appnair.They are using livelink 9.7 and they provided the lapi sdk only.
Anyway I will try my best.
 
in lapi when you locate the node as in your code if you say give me the attribute data it will give you a data structure of all the categories/attributes per category,while inefficient it can be used to find it.
some people don't like to query tables they want to do it with api all the way.
Here are some old links of category work

Here is me explaining to a user how to enumerate the values


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
One last question how can I get all the object Ids if I don't have any,I mean from the root.
I know using oracle I can use
SQL:
 select dataid, parentid, name, versionnum from dtree where parentid = 6242946

However, using LAPI what will be my starting point?
 
not sure what you are asking but in oracle your version of 971 you can use this
Go to the folder where parentid-6242946
you can say select name,level,dataid,ownerid,subtype,parentid from dtree connect by prior dataid=parentid start with dataid=6242946
This will be equivalent to lapi.listobjects(6242946) first level , lapi will not recurse for you .In lapi you will check if the type returned is a 0 recurse again that
is how you go in and in....

In version 10 onwards OT provides two support tables DtreeAncestors and DBrowseAncestors so you can do this more efficiently not using the "connect by prior" of Oracle.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
All is good,however the system use arabic language.
All the letter are coming unicoded.
And XMLExport takes 3 parameters what shall I pass for LLValue options?
Any ideas?
 
I do not know how to further advise you .My last post regarding this subject.If search is configured and works there you might be able to follow this example
the example shows how a livelink search can be called form a html page pre-cursor
to REST.If you follow that each attribute that comes back will have a DisplayName.If it comes as arabic I wouldn't know what to do.
Why is XMLexport being used ?

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top