Anonymous  [11 posts]
8 year
hi. I`m new to roborealm. I want to draw a offset line to probed lines count variable (a line drawn to probed lines count variable). please let me know how. thank you.
Steven Gentner from United States  [1446 posts] 8 year

I'm not 100% sure what you are asking. If you had an example image that might be easier to understand.

The basic idea would be to create a variable (as in your other post) that you would use in the variable dropdown (i.e. probe_result) in the display_line module.

Anonymous  [11 posts] 8 year
Thank you a lot for the immediate respond. now I understand a bit about cScript.   ******but I could not resolve the problem because of my error in the post.****  it should be PROBED_LINES instead of PROBED_LINES_COUNT.  The variable has many values (XY coordinates) that does not work with the cScript. please help.


Steven Gentner from United States  [1446 posts] 8 year
Ok, thanks for the clarification, it pays to be very specific when asking questions. Perhaps the following will give you an example of how to process an ARRAY variable as apposed to a variable:

float list[256];
int num = getFloatArrayVariable("PROBED_LINES", list, 256);

float avgx = 0;
int i;
for (i=0;i<num;i+=2)


This will calculate the average X coordinate of all the detected lines. The probed_line contents array is explained in the documentation page


Keep in mind that there are is also a VBScript, Python and JScript module if you are more comfortable with those languages.


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