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!

Download a file from Livelink (Livelink ® Version 9.2.0.1.176)

Status
Not open for further replies.

VBAInterest

IS-IT--Management
Mar 20, 2009
7
IN
Dear Experts,
I am using LiveLink Enterprise (WebDav view doesnt exist). We have a requirement of downloading approximately 200 files from livelink. The process we follow is to search for an individual file and once the file is searched there is an icon against the resultant file which has the option to download or fetch which downloads the file. Since this is too manual a work and time consuming, we are planning to automate it.

I am using EXCEL 2003 VBA to automate this request. Sheet1 has the 200+ file names that I have to download.

I started off with the work but am struck right at the beginning. I am able to get on to the link, login using our credentials and search for the file too... However, once the search file is obtained I am not able to proceed further since I am not able to capture the Function menu using the VBA code or dont know how to initiate the Functionmenu using VBA. Also, I noticed that there is a node id that is being fetched when the file is downloaded. I am not able to understand where the node id is being fetched.

I Appreciate any help that you can provide me in taking me further with this project.

Thank you,
VC
 
Hi,I am not sure if I asked the right question. My knowledge with Livelink is very limited and I am a starter in VBA. My apologies if I dont make sense here...

This is the code that I am using. Unfortunately due to company policies I will not be able to reveal the real links.

---------------------------------------------------------

Set IEApp = CreateObject("InternetExplorer.Application")
IEApp.Visible = True
IEApp.navigate "
TimeOut = Now + TimeValue("00:00:20") '-- wait maximum of 20 seconds

Do While IEApp.Busy Or IEApp.readyState <> 4
DoEvents
If Now > TimeOut Then
MsgBox "Time Out before Login"
Exit Sub
End If
Loop


With IEApp.Document.LoginForm
.UserName.Value = "xxxxxx"
.Password.Value = "xxxxxx"
.submit
End With


TimeOut = Now + TimeValue("00:00:10") '-- wait maximum of 10 seconds

Do While IEApp.Busy Or IEApp.readyState <> 4
DoEvents
If Now > TimeOut Then
MsgBox "Time Out after Login"
Exit Sub
End If
Loop

TimeOut = Now + TimeValue("00:00:10") '-- wait maximum of 10 seconds

Do While Now < TimeOut
DoEvents
Loop

'IEApp.navigate ("")
ActiveWorkbook.Sheets("Sheet1").Select

For i = 2 To ActiveSheet.UsedRange.Rows.Count

FilName = CStr(ActiveWorkbook.Sheets("Sheet1").Cells(i, 1).Formula)

With IEApp.Document.SearchBarForm
.FullText_value1.Value = FilName
.collections_search_selected.Value = xxxxx '--- this is for Enterprise
.withinQuery.Value = "YES"
.submit
End With

TimeOut = Now + TimeValue("00:00:05") '-- wait maximum of 5 seconds

Do While Now < TimeOut
DoEvents
Loop
 
I don't know much about VBA but if you are getting the nodeid(dataid,objid) in livelink you do not need the functions button for anything.

For eg If I have a word document in livelink then look at the URL

Code:
http(s)://<livelink servername>/<service name>/livelink|exe|llisapi?Func=ll&objid=<nodid>&objaction=download
is all you need to get the file downloaded.That is clearly what the functions menu is doing as well.Naturally the file will be served after checking the login creds etc.I do not know how in VBA you will use this as a bulk downloader.

OpenText makes products like LivelinkAPI and webservices so that you can use its calls to automate your job.If you have the product called livelink exploreer you have the files for doing this in LAPI.

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
 
BTW I forgot to add a couple of points
If you have DirSvcs installed and is configured for SSO(single sign On) the VB app may not get challenged if the app is running under your credentials.
If there is no SSO you can send the login id and password and have the real action in the nextURL parameter with URL encoded.This is very insecure.Here is an example.I am trying to retreive a file dataid based on this KB posting



What I am really after is this link
Code:
[URL unfurl="true"]http://localhost/Livelink/llisapi.dll?func=ll&objId=37519&objAction=download&viewType=1[/URL]

putting the URL with a userid,password so that it looks like
automatic login

[URL unfurl="true"]http://localhost/Livelink/llisapi.dll?func=LL.login&username=<USERNAMEHERE>&password=<PASSWORDHERE>&[/URL]
NextURL=%2FLivelink%2Fllisapi%2Edll%3Ffunc%3Dll%26objId%3D37519%26objAction%3Ddownload%26viewType%3D1

another thing is that the application knows what objaction is allowed on what object subtype so if you put download for a folder it will not work

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
 
Hi AppNair,

Wishing you a Happy & Prosperous Onam... :) Thank you very much for responding. I have two constraints here using the method mentioned by you...
1) I am able to get the nodeid when I search for individual files and look at the source file... However, is there a way that I can get only the node id's for all the 200+ files that I have?
2) When I try using the node id and download a file (its a tif file). The file that is 200kb gets downloaded with a size of 7kb... So that is not working completely well... Any work arounds?

Also, I dont have livelink explorer installed in my office.

Thank you and have a great day!
VC
 
VBA without livelink api is pretty hard to accomplish.I wish I could help you but a file of 200 KB getting downloaded as 7 KB that sounds weird better check what the manual download thru the GUI gives you .What if it is a corrupt file to start with ....

If you are executing search the nodeid is in its result along with the hirarchy etc.Look at some sample searchxml api commands a excellent example in the FAQ of this forum.That shows you how you can get to livelink search from a simple html form ..

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
 
Hi AppNair

I understand. I am not sure if the technology support team can help me with getting access to livelink api. I will check with them. Regarding the file that is getting downloaded, the file on livelink is not corrupted. When I download manually its giving me the correct file with the actual file size. The issue is only when I use the download via VBA.

Thank you...
VC
 
If all you want to do is download a group of documents based on search criteris, this may seem a simplistic answer

Have you looked at the Collections module? This module allows you to search for objects based on whatever search criteria you need, organize them into a collection, and then download them or save them off to a CD, complete with a manifest describing what each document is, it can include the document audit trail if necessary, etc.

I'm not sure how it works on version 9.2, but it works great on version 9.7 and 9.7.1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top