Get Interface¶
Get Tasks used in the current Mech-Viz project¶
The function to get Tasks used in the current Mech-Viz project is as follows.
def get_viz_task_names(self, msg={}, timeout=None):
result = self.call_viz("getAllTaskNames", msg, timeout)
logging.info("Property result: {}".format(json.loads(result)))
return result
After get_viz_task_names() is called, a string in JSON format that represents all obtained Tasks will be returned.
Get parameters in Mech-Viz or Mech-Vision project¶
The function to get parameters in Mech-Viz or Mech-Vision project is as follows.
def get_property_info(self, msg={}, get_viz=True, timeout=None):
result = (self.call_viz if get_viz else self.call_vision)("getPropertyInfo", msg, timeout)
logging.info("{0} property result: {1}".format("Viz" if get_viz else "Vision", json.loads(result)))
return result
When the function is called with no “type” specified for the msg parameter, all parameters will be obtained. If a certain type is specified, only parameters of the corresponding Task/Step will be obtained. For example, after get_property_info(msg={“type”: “move”}) is called, a string in JSON format that represents parameters of the move Task will be returned.