news 2026/5/4 2:01:35

Toolblock高级脚本函数介绍

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Toolblock高级脚本函数介绍

Toolblock高级脚本函数介绍

#regionnamespace imports// 一 命名空间usingSystem;usingSystem.Collections;usingSystem.Drawing;usingSystem.IO;usingSystem.Windows.Forms;usingCognex.VisionPro;usingCognex.VisionPro.ToolBlock;usingCognex.VisionPro3D;usingCognex.VisionPro.ImageProcessing;#endregionpublicclassCogToolBlockAdvancedScript:CogToolBlockAdvancedScriptBase{// 二 全局变量#regionPrivate Member VariablesprivateCognex.VisionPro.ToolBlock.CogToolBlockmToolBlock;#endregion// toolblock的运行方法publicoverrideboolGroupRun(refstringmessage,refCogToolResultConstantsresult){// To let the execution stop in this script when a debugger is attached, uncomment the following lines.// #if DEBUG// if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break();// #endif// 运行所有的工具模块foreach(ICogTooltoolinmToolBlock.Tools)mToolBlock.RunTool(tool,refmessage,refresult);returnfalse;}#regionWhen the Current Run Record is Created/// <summary>/// Called when the current record may have changed and is being reconstructed/// </summary>/// <param name="currentRecord">/// The new currentRecord is available to be initialized or customized.</param>publicoverridevoidModifyCurrentRunRecord(Cognex.VisionPro.ICogRecordcurrentRecord){}#endregion#regionWhen the Last Run Record is Created// 在GroupRun运行之后运行,进行渲染publicoverridevoidModifyLastRunRecord(Cognex.VisionPro.ICogRecordlastRecord){}#endregion#regionWhen the Script is Initialized// 初始化方法,在GroupRun运行之前运行publicoverridevoidInitialize(Cognex.VisionPro.ToolGroup.CogToolGrouphost){// DO NOT REMOVE - Call the base class implementation first - DO NOT REMOVEbase.Initialize(host);// Store a local copy of the script hostthis.mToolBlock=((Cognex.VisionPro.ToolBlock.CogToolBlock)(host));}#endregion}
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/1 19:51:12

【数据分享】全国村级行政区矢量(免费/无套路分享)

行政区划边界矢量数据是我们在各项研究中最常用的数据。本次我们为大家带来的是我国分省的行政村&#xff08;社区&#xff09;的行政区划矢量数据&#xff01;数据格式为Shp&#xff0c;每一个省份的行政村&#xff08;社区&#xff09;行政区划数据保存为一个shp文件。数据范…

作者头像 李华
网站建设 2026/4/26 15:11:26

AI圈炸锅!DeepSeek-OCR黑科技:压缩10倍长文本,成本直降90%!VTC技术让大模型“过目不忘“,中科院发布权威评测

【导读】DeepSeek-OCR的视觉文本压缩&#xff08;VTC&#xff09;技术通过将文本编码为视觉Token&#xff0c;实现高达10倍的压缩率&#xff0c;大幅降低大模型处理长文本的成本。但是&#xff0c;视觉语言模型能否理解压缩后的高密度信息&#xff1f;中科院自动化所等推出VTCB…

作者头像 李华
网站建设 2026/5/3 1:44:55

MindSpore开发之路:静态图 vs. 动态图:掌握MindSpore的两种执行模式

在使用MindSpore的过程中&#xff0c;我们几乎在每个脚本的开头都会写下一行代码&#xff1a;context.set_context(mode...)。这行代码的作用是设置MindSpore的执行模式。这是一个非常核心的设置&#xff0c;它从根本上决定了你的代码是如何被框架解释和执行的&#xff0c;直接…

作者头像 李华
网站建设 2026/4/19 19:12:17

有关漏洞挖掘的一些总结,新手小白网络安全入门必看的经验教训!

时隔一年多以后再次看本文&#xff0c;依然给我一些启发&#xff0c;尤其是经过一定量的实践以后&#xff0c;发现信息收集真乃漏洞挖掘(渗透测试)的本质&#xff0c;这里再次回顾一下本文&#xff0c;尤其是里面如何评估一个项目(目标)的难度&#xff0c;值得学习与借鉴&#…

作者头像 李华
网站建设 2026/5/1 8:50:22

ue用tick通信执行方法 mcp铺垫

tick是什么我不知道&#xff0c;反正是跑通了 你这段代码中使用的 “Tick”&#xff0c;并不是 Unreal Engine 中常见的 Actor 或 Component 的 Tick() 函数&#xff0c;而是通过 unreal.register_slate_post_tick_callback() 注册的一个 Slate UI 系统级别的每帧回调函数。 &…

作者头像 李华