RobotStudio event

Insert Procedure Call into path with SDK

Armandb
Armandb
edited October 2015 in Developer Tools
Hello everyone,
Anyone know how to add a procedure call in a path using the SDK RobotStudio?
I think we should use:
Dim callproc As New RsActionInstruction  ("", "", "")
with the constructor 

public RsActionInstruction( RsTask task, string descriptionName,string instructionTemplateName)

But I do not know what specifies for the instructionTemplate and the descriptionName.

Best regards,


So i found the solution,
Just use the class 
Dim proccall As RsPathCallInstruction

Sample :wink: 
   Dim station As Station = TryCast(Project.ActiveProject, Station)
        For Each Path As RsPathProcedure In station.ActiveTask.PathProcedures
            Dim listofrsinstruction() As RsInstruction = Path.Instructions.ToArray
            For Each InStr As RsInstruction In listofrsinstruction
                Dim proccall As New RsPathCallInstruction("Path_20")
                Path.Instructions.Add(proccall)
            Next
        Next