Programming Path Statement in Python

Forum Forums Visual Components 4.0 Robot Programming Programming Path Statement in Python

Be sure to read the Forum Rules and Guidelines before start using the Forum.

This topic contains 2 replies, has 3 voices, and was last updated by zesty zesty 1 year, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #2393


    Instead of Teaching a path of positions I want to create it within a python script.

    Currently I read the positions from a file, create VC_Compactlineset and program the path statemant via the Robot-Program-Editor and edit motion marameters or the point density.

    I know how to create a statement but I don’t know how to fill it with positions and how to edit the statement’s parameters and modify each point in python api.




    Maybe the following code snippet could be helpful for your. It creates a target using the current robot position and sets it as the statement’s position:

    active_robot = app.TeachContext.ActiveRobot
    controller = active_robot.getBehavioursByType('rSimRobotController')[0]
    new_target = controller.createTarget()
    statement.Base = new_target.BaseName
    statement.Tool = new_target.ToolName
    statement.Name = "Statement's Name"
    statement_position = statement.createPosition("Position's name") #this string is shown within the 3D-View 
    statement_position.PositionInWorld = new_target.Target

    Schema is used to manage positions of path statement. Unfortunately, the Python API for path statement is still in development. A video tutorial on this topic will be made once the API is made available to end users.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.