news 2026/5/19 2:49:07

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/9 19:04:45

【课程设计/毕业设计】基于深度学习的砖头墙裂缝识别

博主介绍&#xff1a;✌️码农一枚 &#xff0c;专注于大学生项目实战开发、讲解和毕业&#x1f6a2;文撰写修改等。全栈领域优质创作者&#xff0c;博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java、小程序技术领域和毕业项目实战 ✌️技术范围&#xff1a;&am…

作者头像 李华
网站建设 2026/5/14 20:16:41

从入门到落地:MindSpore实战指南与经验总结

MindSpore是华为自研全场景AI框架&#xff0c;覆盖开发、训练、部署全链路&#xff0c;适配多领域需求&#xff0c;助力新手入门与资深开发者落地项目。本文精简提炼入门准备、核心实操、模型部署、性能优化、问题排查五大模块的实战要点&#xff0c;帮助开发者快速上手、少走弯…

作者头像 李华
网站建设 2026/5/18 18:03:36

Linux---Tomcat服务器Varnish代理服务器

Linux 上配置 Varnish 作为 Tomcat 服务器的反向代理 Varnish 是一款高性能的 HTTP 加速器和反向代理缓存服务器&#xff0c;常用于前端缓存动态内容&#xff08;如 Java Web 应用&#xff09;&#xff0c;减少 Tomcat 的负载。Tomcat 是 Java 应用的容器&#xff0c;通常运行…

作者头像 李华
网站建设 2026/5/16 9:35:06

最新版最详细Anaconda新手安装+配置+环境创建教程

Anaconda 新手安装 配置 环境创建教程&#xff08;最新版&#xff0c;基于 2026 年信息&#xff09; Anaconda 是一个开源的 Python 和 R 发行版&#xff0c;专为数据科学、机器学习和科学计算设计。它包含了 conda 包管理器、数百个预装包&#xff08;如 NumPy、Pandas、Ma…

作者头像 李华