Author Topic: What are the parameters for servercmdSetPrint? [SOLVED]  (Read 897 times)

What I'm trying to do is make a brick set to a certain print when the build loads. I tried using trace but it didn't give me the parameters, it just gave me the variables it used for the parameters. I'm looking for serverCmdSetPrint(%parameter1, %parameter2), and I need to know what parameter 1 and 2 are.
« Last Edit: August 17, 2014, 11:31:50 AM by Gordo12699 »

Most likely Client and Print ID.
The current printed brick is usually set to the client (the reason you can push the print gui remotely, same with the event gui).
You can alternatively use %brick.setPrintID(%id) or something, and if I am correct, you can get the print id with a global variable, something like $uiName, not sure.

Code: [Select]
function serverCmdSetPrint(%client, %index)

The first argument of a server command will always be %client.

Thank you guys for answering my question! The way I set the print on a brick remotely/via code was to get the bricks objectID or %brick and then use the function setPrint(%printID). An example is: %brick.setPrint(%printID)

To find out the printID just put the print on a brick and get the .printID global variable from the brick using dump().

Thanks again guys!