03-01-2010 03:04 PM
Hi all!
I have been using NI Template Editor for a long time. It is a very very useful program, and it can be called form VA / VBA. Thats the reason why it is so useful. I would like to know how should I use this function/program from my own code. ( call parametrized Template Editor e.g. form my pattern matcher program like in VBA/VA - for current Image.)
I used system execute vi- which run standard *.exe files , but in this case, image file must be selected.
I would like to know how should I use T.E. in my own program, as flexible as possible like, VA/VBA - for current image!
Thank you very much!!!
Solved! Go to Solution.
03-03-2010 04:24 AM
Hi Durnek,
As far as I understand, you want to develop an application in LV which does Pattern Matching.
For this, you need a Template which you define in Template Editor.
In delopyed applications, the templates are predefined, in which case Template Editor is a great tool, but does not need to be called with every run.
Still, We have encountered similar requests, and we also have a product suggestion to embedd Template Editor in LV, just like VA.
We are hoping this feature will be available in the future.
Until then here are some parameters that could be called 🙂
/new:path -pm -gpm -gpm2 -d
launches the editor and opens the image located at the specified path.
The parameters -pm -gpm -gpm2 and -d are optional and allow to create a template of type pattern matching, geometric matching (legacy), new geometric matching and defect inspection respectively.
You can combine those parameters to create a template of the desired type. Only the specified tabs will be enabled. If you don't specify any optional parameters, all tabs are available.
/edit:path
edits the template located at the specified path.
This is the responsibility of the user to save the template manually within the interface, since the training interface is called by command line and there is no way for the calling application to know if the user OKs or cancels the editor.
One important point regarding calling the template using a command line: if the path contains a space, you need to use quotes, so that the exec knows that this is only one parameter.
For instance:
"Path to template Editor\NI Vision Template Editor.exe" "/new:D:\Images\8 bit\image.tif" -pm -gpm -d
Please reply if this fits your application needs
Best regards,
Mircea
03-03-2010 04:27 AM
Except for the first smiley, ignore all the rest and replace them with : 😛 = : p
03-03-2010 04:32 AM
03-11-2010 04:47 AM
03-12-2010 01:24 AM
I am glad I could help.
Have fun with your application 🙂
Emil
03-17-2010 02:44 AM
03-17-2010 02:55 AM
Hello,
Unfortunately this is the only data that was documented internally by R&D.
It will be released public in future versions of Vision, probably Template Editor will be available as an Express VI in LV.
As an idea, what other parameters would you be interested in?
Thank you,
Emil
03-17-2010 03:00 AM
03-17-2010 04:31 AM
I would go for :
/edit : path
edits the template located at the specified path.
This is the responsibility of the user to save the template manually within the interface, since the training interface is called by command line and there is no way for the calling application to know if the user OKs or cancels the editor.
One important point regarding calling the template using a command line: if the path contains a space, you need to use quotes, so that the exec knows that this is only one parameter.
For instance:
"Path to template Editor\NI Vision Template Editor.exe" "/new:\Images\8 bit\image.tif" -pm -gpm -d
Organize a small file structure of your application, having a dedicated folder for templates.
🙂 Hope it will be useful,
Emil