Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by DJ Sures!

C# Sdk Tutorial 52 Get Variable Question

I'm using the C# SDK Tutorial 52 Get Variable to test communications with my app EZ-Face. The code below shows how to send or set a variable "X" and Get "X". I understand Set "X"


private void btnSetX_Click(object sender, EventArgs e) {

sendCommand(string.Format("$FaceName = {0}", tbX.Text));

private void btnGetX_Click(object sender, EventArgs e) {


What I am wondering about is how could I use the GetX event "Print($x)" to take that variable from ARC and set it as a variable in C# or even display it in a text box?

Thank you!


Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

Edit. Deleted my answer which was apparently either wrong or I mis- interpreted the question so as not to confuse later readers of the thread.

Here's the updated project that will help you: Tutorial52-EZ-BuilderScriptInterfaceClient.zip

To clarify, I have modified sendCommand() to now return the response string.


private string sendCommand(string cmd) {

try {

Log("Sending: {0}", cmd);


_tcpClient.Client.Send(System.Text.Encoding.ASCII.GetBytes(cmd + Environment.NewLine));

return readResponseLine();
} catch (Exception ex) {

Log("Command Error: {0}", ex);


return string.Empty;

So now your Get X looks like this...


private void btnGetX_Click(object sender, EventArgs e) {

string retVal = sendCommand("print($x)");

@DJSure - Thank you Thank you! :D

That is exactly what I was hoping for and trying to do. I had tried something similar to "string retVal = sendCommand("print($x)");" for the get button but was on the wrong path trying change how the private void Log function worked.
@thetechguru - Thanks Alan - I knew you were trying to help, but I did get the sense you may not have understand my question originally.
:) I appreciate you trying to help.
South Africa
Is it possable to make your robot atonoumous if you use the non proggramer application because I heard C++ is only for people that have a lot of experience in programming
Society, this section of the message board that you replied too is for programmers. The rest of the forum is for non programmers. This question topic is regarding programming the ez-sdk for custom interface, etc.

What you're asking for is within the ARC (non programmers) software.:) yes, it does everything including autonomous navigation by detecting objects in it's way with the radar controls.