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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Docs with Attributes

Status
Not open for further replies.

stevejjj

Programmer
Sep 20, 2007
1
US
I'm creating an application that needs to import documents into Livelink. It will determine the location in which to save the files (creating folders if necessary), and attach attributes to the file.

I can successfully connect, I've added docs (AddDocument()) and created folders (CreateFolder()).

How can I create subfolders - can I create a full path in one go: CreateFolder(parentVol, parentID, "folder\\subFolder\\subsubFolder", objInfo) ... or do I need to create folder, change working directory, create subfolder, change working directory, etc?

I'm struggling with the attribute creation - I've got a set of attributes that I need to attach to a file. attrInfo.add(name, value) - that makes sense. Does LL need to be configured ahead of time to know what attribute names I will be assigning?

Categories - how do these relate to attributes - a category has a set of attributes?

Lastly, once I have added my list of attributes, how do I bind that attrInfo data to the file?

Sorry - lots of questions, just hoping to get this one knocked out.

Steve
 
Dont think of LL as a file structure,it is not
so all your change current wd are Os commands ,but ll is a dms emulating some of the antics of a file system

the best way to understand this is to go to the OT KB and look at an example document that does this.Try to think in livelink as objects.For eg the document object may need a version but a folder object may not,both of them can have a category that is another object.

Typically lapi does not give you recursive routines,You create a folder,then LL has a node allocated,you put another in it and so on.

Your category has a dataid.thru lapi you ask for its latest and greatest version.Then you fill out the leaves of the category data structure aka attributes.

So if I wanted to create a document and add a category with some values maybe my syntax is wrong but the flow should be at least correct

Get the category version you want/manipulate it with setobjectattributes.This becomes an assoc that you put in the createInfo assoc


CreateObjectEx with a document subtype .Now document node will be created with the category that you specify

Finish it off with a CreateVersion


I recently did a VB .NET lapi project file that does these things albeit not generic,you need to read on my clumsy documentation

If you are interested in seeing this send me a mail.I shall not be responsible for any damage that code does.you can get in touch with me thru or my own site nairkn.com


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top