Use C# for Catia V5 Automation(使用 C# 实现 Catia V5 自动化)
问题描述
我想用编程语言 C# 为 Catia V5 编写宏/程序.
I want to write Macros/Programs for Catia V5 with the programming language C#.
如何通过 c#(和 Visual Studio)访问 Catia 应用程序.我搜索了一下,发现 Catia 提供了一个 API,Microsoft COM Technologie 为像 c# &蟒蛇.
How is it possible to access the Catia applicataion via c#(and Visual Studio). I searched a bit and found out that Catia provides an API, which the Microsoft COM Technologie provides for 'COM-languages' like c# & python.
这就是我想象的 C# 程序和 Catia 之间的连接/交互方式:
This is how I imagine the connection/interaction between a C# Programm and Catia:
C# - .NET <-双向集成-> COM <-> Catia API
对吗?
另外:如何在 Visual Studio 中设置所有内容,以便可以访问 Catia API(和代码完成等)
Also: How do I setup everything in Visual Studio , so that I can access the Catia API (and code completion etc.)
推荐答案
1) 在引用中添加INFITF
typelib库,作为CATIA应用程序的接口
1) Add INFITF
typelib library in reference which is interface to CATIA application
2) 像这样将CATIA定义为全局变量
2) Define CATIA as global variable as like
INFITF.Application CATIA;
3) 将 catia 应用程序绑定到您的 CATIA
变量,如下所示
3) Bind the catia application to your CATIA
variable as below statement
CATIA = (INFITF.Application)Marshal.GetActiveObject("Catia.Application");
希望这可以帮助您入门.
Hope this would helps you to get started.
这篇关于使用 C# 实现 Catia V5 自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 C# 实现 Catia V5 自动化


基础教程推荐
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01