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
Renaming Documents using LAPI in VB 6
Linda_Meyer
I'm lost. I can navigate around the folder structures, find what documents I need to change, but I can't find any help in how to rename the documents. I'm sure this must have been covered at some point, could I get a link or something to help push me in the right direction?Thanks.
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty N. via eLinkLong LL_UpdateObjectInfo( _ ByVal session as Long, _ ByVal volumeID as Long, _ ByVal objectID as Long, _ ByVal objectInfo as Long )the value object objectInfo should be populated with the new name Thanks MuchKrishnankutty N NairWork 918-661-5824 Fax:918-661-9206Learn more about EDMS powered by Livelink at
http://edms.conoco.net/edms.htm-----Original
Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Wednesday, January 26, 2005 2:18 PMTo: eLink RecipientSubject: Renaming Documents using LAPI in VB 6Renaming Documents using LAPI in VB 6Posted by MichgamUser3 on 01/26/2005 03:13 PMI'm lost. I can navigate around the folder structures, find whatdocuments I need to change, but I can't find any help in how to renamethe documents. I'm sure this must have been covered at some point, couldI get a link or something to help push me in the right direction?Thanks.[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: LAPI Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=765428&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Linda_Meyer
Do you use LL_ValueSetString to create that variable for objectInfo?LL_GetObjectInfo(curSession, VolID, objID, tempObjectInfo)LL_ValueSetString(tempObjectInfo, "TEST.pdf")LL_UpdateObjectInfo(curSession, VolID, objID, tempObjectInfo)This is what I have. I know it's wrong. LAPI Documentation is tough to follow.
Quentin_Stringham_(dtcwdtc02_-_(deleted))
Give this a try:Public Function ChangeName(session As Long, VolID As Long, ObjID As Long, NewName As String)'Change the name of an objectDim ObjectInfo As Long status = LL_ValueAlloc(ObjectInfo) status = LL_ValueSetAssocInArgs(ObjectInfo) status = LL_AssocSetString(ObjectInfo, "Name", NewName) status = LL_UpdateObjectInfo(session, VolID, ObjID, ObjectInfo) status = LL_ValueFree(ObjectInfo) End Function
Mohammed_Abushmais
Here is a function that can be used to rename any object(i.e. Document, folder..etc) It returns LL_OK(0) if successed, and errorr_status otherwise. Public Function Rename(ByVal Session_ID As Long, ByVal Volume_ID As Long, ByVal Object_ID As Long, ByVal Name As String) As Long Dim Status As Integer Dim objectInfo As Integer Dim DocName As String Dim Trial As Integer = 0 Status = LL_ValueAlloc(objectInfo) Status = LL_GetObjectInfo(Session_ID, Volume_ID, Object_ID, objectInfo) Status = LL_AssocSetString(objectInfo, "Name", Name) Status = LL_UpdateObjectInfo(Session_ID, Volume_ID, Object_ID, objectInfo) If (Status = LL_OK) Then Status = LL_ValueFree(objectInfo) Return LL_OK Else Return Status End If End FunctionThe key point here is that whenever you need to change a field, you need to read it first, the you can update it.I hop that helps.Yaser
Mark_Wescott
when i tried to use the setString method i always get an error of "setString(n, name, value) is not supported in this datatype" do you know why these is happening?
Louis_Routhier
Maybe I'm wrong but from what I know, there is no implementation of setString with 3 parameters in the .NET API.The signature is:Public Overrides Sub setString(ByVal name As String, ByVal value As String)