removing a template ID from ADR template

Discussions about machine vision support in GdPicture.
Post Reply
User avatar
kketterman
Posts: 32
Joined: Tue Apr 21, 2009 6:55 pm

removing a template ID from ADR template

Post by kketterman » Tue May 19, 2009 4:55 pm

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.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: removing a template ID from ADR template

Post by Loïc » Thu May 21, 2009 9:06 pm

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

User avatar
kketterman
Posts: 32
Joined: Tue Apr 21, 2009 6:55 pm

Re: removing a template ID from ADR template

Post by kketterman » Fri May 22, 2009 7:41 pm

Hello,
This only seems to be an issue if there is only 1 template configured. After adding several templates, I get the expected results.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: removing a template ID from ADR template

Post by Loïc » Sat May 23, 2009 7:50 pm

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"))

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest