Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
LAI, Categoies and Attributes
Richard_Ma_(mtrcadmin_-_(deleted))
We have a VB program which does uploading files to livelink. We are now going to enhance it in the following way:- let user choose a Category from WS- read a text file which contains columns and rows. They will match each file's attributes.I have done the following parts:- upload file- apply cateogry to a filewhat I can't solve is:How to set attributes of a Cateogry and apply it to a document/Object?Thank you very much
Find more posts tagged with
Comments
Dave_Russell_(CCIDR_(Delete)_2115817)
In version 8 you use the "GetObjectAttributes" and "SetObjectAttributes" functions together with TableGetRecord and RecordGetValue.Attributes of an object are returned in a record containing ATTRNAME, VALUE and a few more columns. Find the record with the ATTRNAME you want to put the new VALUE into.So....1 GetObjectAttributes2 3 SetObjectAttributesIn livelink 9 it all changes, I believe......
Richard_Ma_(mtrcadmin_-_(deleted))
I just read the forum and use:LL_AttrListNames(lngSession, lngCatVersion, 0, lngAttributes)to get the attribute list of a category... but... I don't know how to get and set the list...anybody can help?btw, Thanks Dave
Richard_Boyne_(boyne_(Delete)_891609)
You might try somthing like,> - let user choose a Category from WSUse LL_FetchCategoryVersion ( _ ByVal session as Long, _ ByVal catID as Long, _ ByVal catVersion as Long )To init the catVersion structure in your VB app. with an instance of the category definition and default attribute values.> - upload fileIf you are satsified with the default values for your category attributes you can simply assign the catVersion to the document/Object:a) At document/Object creation time with LL_CreateObjectEx( _ ByVal session as Long, _ ByVal parentVolID as Long, _ ByVal parentID as Long, _ ByVal objType as Long, _ ByVal objSubType as Long, _ ByVal name as String, _ ByVal createInfo as Long, _ ByVal objectInfo as Long ) see the "createInfo.Categories" description in the doc for this function.b) After the document object already exists with LL_SetObjectAttributesEx( _ ByVal session as Long, _ ByVal objID as Long, _ ByVal catVersion as Long )Before assigning the category version to your document/Object, if you want to set new value(s) on a category attribute( once you have the catVersion Assoc returned from FetchCategoryVersion or GetObjectAttributesEx):Use c) LL_AttrListNames ( _ ByVal session as Long, _ ByVal catVersion as Long, _ ByVal attrPath as Long, _ ByVal attrNameList as Long ) To retrieve the list of attribute names from the category version assoc. In case your app. does not already know the attribute names.d) LL_AttrGetInfo ( _ ByVal session as Long, _ ByVal catVersion as Long, _ ByVal attrName as String, _ ByVal attrPath as Long, _ ByVal attrInfo as Long ) To retrieve definition information on an individual attribute. In case the app. needs to know the attribute data type, size, pop-up values, etc.e) LL_AttrGetValues ( _ ByVal session as Long, _ ByVal catVersion as Long, _ ByVal attrName as String, _ ByVal attrValuesType as Long, _ ByVal attrValuesPath as Long, _ ByVal attrValues as Long ) To retrieve an attribute's current data value, in case it is needed to calculate the new value.f) LL_AttrSetValues ( _ ByVal session as Long, _ ByVal catVersion as Long, _ ByVal attrName as String, _ ByVal attrValuesType as Long, _ ByVal attrValuesPath as Long, _ ByVal attrValues as Long ) To assign a list of one or more data values to the attribute in the category version structure.Once the app. has used AttrSetValues to update attribute values in the category version it should use CreateObjectEx or SetObjectAttributesEx (mentioned above) to assign the updated category attributes to the document/Object.Please see the online Livelink SDK API Developers Reference documentation for the specifics on these functions.
Richard_Ma_(mtrcadmin_-_(deleted))
Exactly! Thank you very much...Actually, I am new to VB and the LLAPI. I have read those Developer API but they are nearly useless.Would u mind sharing your experience? Where can I find more usable information?Thanks a lot!