/// <summary> /// Gets the value of a control variable (in main) /// </summary> public HTuple GetCtrlVarTuple(int index) { IntPtr tuple; HDevProgramCall.HCkE(EngineAPI.GetCtrlVarTuple(this.call, index, out tuple)); GC.KeepAlive((object)this); return(HalconAPI.LoadTuple(tuple)); }
/// <summary> /// Gets the values of an iconic vector variable /// (in main) /// </summary> public HObjectVector GetIconicVarVector(string name) { IntPtr vector; HDevProgramCall.HCkE(EngineAPI.GetIconicVarVector(this.call, name, out vector)); GC.KeepAlive((object)this); return(EngineAPI.GetAndDestroyObjectVector(vector)); }
/// <summary> /// Gets the object of an iconic variable (in main) /// </summary> public HObject GetIconicVarObject(string name) { IntPtr key; HDevProgramCall.HCkE(EngineAPI.GetIconicVarObject(this.call, name, out key)); GC.KeepAlive((object)this); return(new HObject(key)); }
/// <summary> /// Gets the values of a control vector variable /// (in main) /// </summary> public HTupleVector GetCtrlVarVector(int index) { IntPtr vector; HDevProgramCall.HCkE(EngineAPI.GetCtrlVarVector(this.call, index, out vector)); GC.KeepAlive((object)this); return(EngineAPI.GetAndDestroyTupleVector(vector)); }
/// <summary> /// Gets the xld contour of an iconic variable (in main) /// </summary> public HXLD GetIconicVarXld(string name) { IntPtr key; HDevProgramCall.HCkE(EngineAPI.GetIconicVarObject(this.call, name, out key)); GC.KeepAlive((object)this); EngineAPI.AssertObjectClass(key, "xld", "main"); return(new HXLD(key)); }
/// <summary> /// Gets the region of an iconic variable (in main) /// </summary> public HRegion GetIconicVarRegion(int index) { IntPtr key; HDevProgramCall.HCkE(EngineAPI.GetIconicVarObject(this.call, index, out key)); GC.KeepAlive((object)this); EngineAPI.AssertObjectClass(key, "region", "main"); return(new HRegion(key)); }
/// <summary> /// Resets the program execution /// </summary> public void Reset() { HDevProgramCall.HCkE(EngineAPI.ResetProgramCall(this.call)); GC.KeepAlive((object)this); }
/// <summary> /// Stops execution on first line of program. /// </summary> /// /// <remarks> /// This is intended for debugging purposes when you wish to step /// through a specific program call. It only has an effect when a /// debug server is running and it will only stop once. /// /// </remarks> public void SetWaitForDebugConnection(bool wait_once) { HDevProgramCall.HCkE(EngineAPI.SetWaitForDebugConnectionProgramCall(this.call, wait_once)); GC.KeepAlive((object)this); }
/// <summary> /// Executes the program /// </summary> public void Execute() { HDevProgramCall.HCkE(EngineAPI.ExecuteProgramCall(this.call)); GC.KeepAlive((object)this); }
/// <summary> /// Creates a program call for the specified program /// </summary> public HDevProgramCall(HDevProgram program) { HDevProgramCall.HCkE(EngineAPI.CreateProgramCall(program.Handle, out this.call)); GC.KeepAlive((object)this); this.program = program; }