AnsweredAssumed Answered

Templates added to vault not showing up in Addin search

Question asked by Chris Novak on Apr 4, 2019
Latest reply on Apr 4, 2019 by Chris Novak

I've run into a problem I'm rather baffled about. I have added a few templates to my vault via the PDM administration application. They are definitely there and in the list of all the other templates. I also have an addin that loops through the templates using IEdmTemplateMgr5. (VB Code below) But in the code, when looping through the templates, the newly added templates do not show up in the list at all (confirmed by the MsgBox call below. I never see the new templates from the add in, but they are definately in the vault). What am I not understanding here?

 

 

 

Private Sub CreateNewDocument(poCmd As EdmLib.EdmCmd, vault As EdmVault5)

 

        Try

 

            'Open a form to select a document template

            Dim myForm As New frmNewDocumentForm

            myForm.ShowDialog()

 

            If myForm.strDocumentType = vbNullString Then Exit Sub

 

            'Concatenate the template name string based on the form

            Dim templateName As String

            If myForm.strDocumentType = "Other" Then

                Cursor.Current = Cursors.Default

                Call CreateOtherDocument(poCmd, vault, myForm.strProcessType)

                Exit Sub

            Else

                templateName = "QMS Document\" & myForm.strDocumentType & "\" & myForm.strProcessType

            End If

 

            Cursor.Current = Cursors.WaitCursor

 

            'Open the template manager

            Dim templateMgr As IEdmTemplateMgr5

            Dim template As IEdmTemplate5

            Dim pos As IEdmPos5

 

            templateMgr = vault.CreateUtility(EdmUtility.EdmUtil_TemplateMgr)

            pos = templateMgr.GetFirstTemplatePosition

 

            Dim boolTemplateFound As Boolean = False

 

            'Loop through all the templates until we find the one

            While Not pos.IsNull

                template = templateMgr.GetNextTemplate(pos)

                Call MsgBox("Name: " & templateName & "\rName: " & template.GetMenuString)

                If template.GetMenuString = templateName Then

 

                    Cursor.Current = Cursors.Default

 

                    'Run the template

                    template.Run(poCmd.mlParentWnd, vault.RootFolderID)

                    boolTemplateFound = True

                    Exit While

                End If

            End While

Outcomes