1

DMS でドキュメントを作成し、いくつかの属性を設定してからチェックインしようとしています。これは、フラットスペース ファイリングを禁止するまでうまくいきました。保存する前にワークスペース フォルダーを指定する必要がありますが、その方法がわかりません。

lcDoc = mcDatabase.CreateDocument()
lcDoc.Security.DefaultVisibility = imSecurityType.imView
lcDoc.Security.GroupACLs.Add("INFORMATION_TECHNOLOGY", imAccessRight.imRightAll)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileDescription, FileName)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileAuthor, msUserID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileOperator, msUserID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileType, "ANSI")
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileClass, "ADMIN")
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom1, ClientID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom2, MatterID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom10, "060")
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom14, DMSServerName)        

' Fails here with error: [Folder ][AddDocument ]Operation requested on a record that     does not exist.
DirectCast(loFolder, NRTFolder).AddDocument(DirectCast(lcDoc, NRTDocument))

' If I comment out the line above, this line returns a failure:
' This operation is currently not available due to flatspace filing restrictions.
Dim lcResults As IManCheckinResult = lcDoc.CheckInWithResults(lsFilePath,     imCheckinDisposition.imCheckinNewDocument, imCheckinOptions.imDontKeepCheckedOut)

この答えを提供する適切な API ドキュメントを見つけるのに苦労しています。

4

1 に答える 1

2

OK、ソリューションは私が知らなかったインターフェイス上にありましたが、COM 開発者ガイドの 81 ページを見つけました。

        lcDoc = mcDatabase.CreateDocument()
        'lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileLocation, loFolder.ObjectID)
        lcDoc.Security.DefaultVisibility = imSecurityType.imView
        lcDoc.Security.GroupACLs.Add("APPLICATIONSDEVELOPMENTALL", imAccessRight.imRightAll)
        lcDoc.Security.GroupACLs.Add("INFORMATION_TECHNOLOGY", imAccessRight.imRightAll)
        ' [04/21/2014 KB] Changed this to use the specified name instead of a hard coded one.

        ' lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileDescription, String.Format("iManageAPI:{0}", "Test Create Document"))
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileDescription, FileName)
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileAuthor, msUserID)
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileOperator, msUserID)
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileType, "ANSI")
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileClass, "ADMIN")
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom1, ClientID)
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom2, MatterID)
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom10, "060")
        lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom14, DMSServerName)
        ''loFolder.AddDocument(lcDoc) 'Add document to folder
        'DirectCast(loFolder, NRTFolder).AddDocument(DirectCast(lcDoc, NRTDocument))
        'Dim lcResults As IManCheckinResult = lcDoc.CheckInWithResults(lsFilePath, imCheckinDisposition.imCheckinNewDocument, imCheckinOptions.imDontKeepCheckedOut)
        lcResults = DirectCast(lcDoc, IManDocument3).
            CheckInExToFolderAsNewDocumentWithResults(lsFilePath, imCheckinOptions.imDontKeepCheckedOut, loFolder,
                                                      imHistEvent.imHistoryNew,
                                                      System.Reflection.Assembly.GetExecutingAssembly().FullName,
                                                      "", "")
于 2014-05-01T19:46:50.733 に答える