Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, 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!

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
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.