Page 1 of 1

removing a template ID from ADR template

Posted: Tue May 19, 2009 4:55 pm
by kketterman
I am trying to remove a template from my template config file using

Code: Select all

status = oImaging.ADRDeleteTemplate(ADRTemplateID)
The status is returning true, but when i run

Code: Select all

docTemplate = oImaging.ADRGetCloserTemplateForGdPictureImage(currentDocID)
I am still getting that template returned.

Re: removing a template ID from ADR template

Posted: Thu May 21, 2009 9:06 pm
by Loïc
Hi,

I can't see any problem.

Here a code for a quick test:

Code: Select all

oGdPictureImaging.ADRStartNewTemplateConfig()
Dim T1 As Integer = oGdPictureImaging.ADRCreateTemplateFromFile("c:\image1.bmp")
Dim T2 As Integer = oGdPictureImaging.ADRCreateTemplateFromFile("c:\image2.bmp")

Imaging1.ADRDeleteTemplate(T2)
MsgBox(Imaging1.ADRGetCloserTemplateForFile("c:\image2.bmp"))
MsgBox(T2)
Please check you code, if the problem persists give me a code snippet to reproduce your problem.

Kind regards,

Loïc

Re: removing a template ID from ADR template

Posted: Fri May 22, 2009 7:41 pm
by kketterman
Hello,
This only seems to be an issue if there is only 1 template configured. After adding several templates, I get the expected results.

Re: removing a template ID from ADR template

Posted: Sat May 23, 2009 7:50 pm
by Loïc
I've tested with only one template and all seems OK:

Code: Select all

        oGdPictureImaging.ADRStartNewTemplateConfig()
        Dim T1 As Integer = oGdPictureImaging.ADRCreateTemplateFromFile("c:\image1.bmp")

        oGdPictureImaging.ADRDeleteTemplate(T1)
        MsgBox(T1)
        MsgBox(oGdPictureImaging.ADRGetCloserTemplateForFile("c:\image1.bmp"))