Variables, Auto-Play, Save of Shape-Match Train
Timo from Germany  [3 posts]
9 year

i bought Roborealm today and I have similar problems... :)

First of all: I'll take screenshots with another computer, store them on a netdrive and then I wan't Roborealm to find up to 10objects in one picture.

Problem 1: When I start Roborealm with my .robo-file, I press open, load an image and then... - almost no objects are found. I have to doubleclick at Shape_Match and train them again...?

After that, the objects are found and they are displayed in the live view - as they should be. (Yeehhaawww :) )

Problem 2: I want to export all labels and the x and y coordinates of the objects. I found a explanation to a similar question (only coordinates and no labels) ( http://www.roborealm.com/forum/index.php?thread_id=5069# ) but it doesn't seem to work, there are no such values which I could need at Geometric statistics...

Last Problem: I already have a C# program which monitors my LAN-folder. When i get new pictures, I wan't Roborealm to start, perform it's actions and close. Is this possible, and is there a simple batch-file tutorial or something?

Thanks in advance and sorry for my bad english...
Steven Gentner from United States  [1446 posts] 9 year

1. Training Issue - When you train the Shape_Match module, you will see a checkbox in that interface that says something about monitoring the folder. This is in the dialog interface where you specify where the images are located. Once that is selected the system will monitor the folder and retrain when any changes (addition or deletion) are done.

2. How do you want to export that information? To a file? You can use the VBScript or other programming modules to create a specific file format if you find that Write_Variables doesn't do the format you need. See the example VBScript provided at the bottom of the documentation page of the Shape_Match module:


That loops through all results and shows how to access the labels.

3. Hmm, no, we don't really have anything built in to quit the application. But we do have a very extensive API that you can use in your C# program to control RR in the manner you are asking. Please read:


and check out the usage of the COM object in the CSharp example.

If you need programming help with your CSharp app, let us know and we can provide a quote as we frequently interface RR to external applications.

Timo from Germany  [3 posts] 9 year
Hi Steven,

thank you for your quick answer.

I only have one more problem: the "Auto Reload and Run" Button in the VBScript Program has no function...? (Load from File is checked, so i can set the hook.., the hook at Continue on Errors is also set.)

To write the variables i have to open the VBScript Program and click "Reload and Run".
By clicking the Button "Run" twice (@Main Window) it will neither write the variables.

Is there a way to get this automated? (Maybe threw the API?)
(Info: I used 1:1 the VBs code from the Shape Matching example.)

Thank you
Steven Gentner from United States  [1446 posts] 9 year

Could you attach your robofile (save current pipeline to something.robo) and post it here? It is possible that something in the VBscript file is causing the problem.

Also, we have had a lot of updates for that module over the past week. If you are not currently running the latest version you may want to do that quickly just to be sure we will test on the same version of the code.

You can do that by going to Options button->Download button. Should only take a couple minutes.

Timo from Germany  [3 posts] 9 year
Hi STeven,

I updated to the latest version - didn't work.
I uploaded the robofile, vbs-file and the resultfile - which i have to create "manually".

Thank you!
Steven Gentner from United States  [1446 posts] 9 year

Your vbscript file is missing two lines at the top:

shapes = GetArrayVariable("SHAPES")
names = GetStrVariable("SHAPES_PATH")

which is why it appeared not to 'reload'.

Also, I realized that you are using the logging function to actually write your content to a file. That can work but you'll have still check if the data really needs to be printed even when it doesn't change ... i.e. you will end up with quite a few entries.

Normally, one opens a file within the VBScript and writes specific text to that file. In your case, any syntax errors will also be logged into that file ... which is what it is really meant for. Take a look at the docs for the VBScript module to see how to open and write to a file.

Note, we did notice an issue that the log file was not getting written unless the editing interface was visible. That was fixed in the latest version. You may want to download that before continuing your tests.

Anonymous 9 year

Just to chip in...

You might be able to close the application by using AutoHotKey
( see http://www.autohotkey.com/docs/commands.htm )

- write a "C:\close_RR.bat"  file to close RR
- then call that file from RR using 'Execute Program'


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index