Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Open iManage document
Galcho
Hello guys,
I have to write function that open document by passing IMANSession, document number and version but I donot know which object to use.
I read about IManFileOpenCmd but I think it is not appropriate fucntion as I do not want to show any dialogs.
Could you give direction which objects to use?
Thank you in advance
Galin Iliev
Senior Software Developer
Find more posts tagged with
Comments
Migrateduser
Hi Galin--
Did you want to open the doc up into WORD or something like that--or did you just want to check it out/export it?
Kind regards,
--p
Paula DiTallo - Middleware Architect/ .NET Developer
plditallo@metro-design-dev.com
Weiqun
I think the easier way is to use the iManExt.OpenCmd to open one or more documents without showing any dialogs. You will need to pass the IManDocument or IManContent to the context item SelectedIManObjects, a safe array, to the command. Hopefully, this could solve your issue.
-Weiqun
jny
Here's a VB6 code example:
Option Explicit
Private Sub Form_Load()
' WorkSite 8.0
Dim dms As New ManDMS
Dim sess As IManSession
Dim doc As IManDocument
' IManExt 8.0
Dim cmd As OpenCmd
Dim context As ContextItems
' local
Dim num, ver As Long
Dim saDox(0) As NRTDocument
' Arbitrary example of num/ver
num = 213
ver = 1
' Logon
Set sess = dms.Sessions.Add("<SERVERNAME>")
' Trusted
sess.TrustedLogin
' Or, explicit
' sess.Login "<username>", "<password>"
If sess.Connected Then
' Get document object handle
Set doc = sess.PreferredDatabase.GetDocument(num, ver)
If Not doc Is Nothing Then
Set saDox(0) = doc
' Populate the ContextItems for the OpenCmd Object
Set context = New ContextItems
With context
.Add "ParentWindow", Me.hWnd
.Add "SelectedIManContent", doc
.Add "SelectedIManObjects", saDox ' Accepts only NRTDocument Object type
End With
' Invoke an instance of the OpenCmd Object
Set cmd = New OpenCmd
With cmd
.Initialize context
.Update
.Execute
If context("IManExt.Refresh") = True Then
MsgBox "Succeeded opening the document."
End If
End With
End If
End If
' Cleanup
If sess.Connected Then
sess.Logout
dms.Close
End If
Set cmd = Nothing
Set context = Nothing
Set doc = Nothing
Set sess = Nothing
Set dms = Nothing
End
End Sub
Galcho
Thank you vey much jny.
this is exactly what I need. I will test and I will post question what I have if any
Thanks again
Galin Iliev
Senior Software Developer