Creo2.0 VBAPI二次开发环境配置

更新时间:2024-05-14 22:50:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Creo2.0 VBAPI二次开发环境配置

1. 设置系统环境变量:

设置PRO_COMM_MSG_EXE环境变量,为pro_comm_msg.exe所在目录。 PRO_DIRECTORY C:\\ptc\\Creo2\\Creo 2.0

PRO_COMM_MSG_EXE

C:\\ptc\\Creo2\\Creo 2.0\\Common Files\\M140\\x86e_win64\\obj\\pro_comm_msg.exe

2. 注册COM服务器: 在[creo_loadpoint]/bin目录下, C:\\ptc\\Creo2\\Creo 2.0\\Parametric\\bin

双击运行vb_api_register.bat。如果要反注册,可以运行同目录下vb_api_unregister.bat

3. 在visual studio2008中项目——添加引用菜单中,进入COM页,选择Creo VB API Type Library for Creo Parametric 2.0,点击确定。

Creo2.0 VBAPI二次开发环境搭建英文版

For your application to communicate with Creo Parametric, you must set the PRO_COMM_MSG_EXE environment

variable to the full path of the executable, pro_comm_msg.exe. Typically, the path to the executable is

\\Common Files\\\\\\obj\\pro_comm_msg.exe, where machine type is

i486_nt for 32-bit Windows and x86e_win64 for 64-bit Windows installations. Set PRO_COMM_MSG_EXE as:

1. Click Start > Settings > Control Panel.

2. Click System. The System Properties windows opens.

3. In the Advanced tab, click the Environment Variables button. 4. Add PRO_COMM_MSG_EXE to System variables.

Registering the COM Server

To register the COM server, run the vb_api_register.bat file located at /Parametric/bin.

To unregister the COM server, run the vb_api_unregister.bat file located at /Parametric/bin.

After the COM server is registered with the system, whenever an application tries to access the types

contained in this server the server starts automatically. By default, Windows starts services such as

pfclscom.exe in the Windows system directory (c:\\winnt\\system_32). Because the server will also start new

sessions of Creo Parametric from the process working directory, you may want to control the server run

Registering the COM Server

To register the COM server, run the vb_api_register.bat file located at /Parametric/bin.

To unregister the COM server, run the vb_api_unregister.bat file located at /Parametric/bin.

After the COM server is registered with the system, whenever an application tries to access the types

contained in this server the server starts automatically. By default, Windows starts services such as

pfclscom.exe in the Windows system directory (c:\\winnt\\system_32). Because the server will also start new

sessions of Creo Parametric from the process working directory, you may want to control the server run

In the VB.NET environment, set this reference as follows: 1. Click Project Properties Add Reference COM.

2. Select Creo Parametric VB API Type Library for Creo Parametric as shown in the following figure.

本文来源:https://www.bwwdw.com/article/srz7.html

Top