본문 바로가기
  • Welcome!
VBA For Creo

Installing and Setting Up Creo VBA API

by ToolBOX01 2024. 9. 3.
반응형

The main reasons for using CREO's VBA (Visual Basic for Applications) API (Application Programming Interface) are to 
automate CREO tasks, develop custom functions, and reduce repetitive tasks to increase efficiency. 
Here are some of the main reasons why you should use CREO's VBA API:

1. Automation and Reduction of Repetitive Tasks:
   - VBA macros can automate frequently used functions or repetitive tasks in CREO. For example, creating
      specific shapes repeatedly or generating drawings in a particular format can be automated using VBA.

2. Development of Custom Features:
   - Sometimes, the default functionalities of CREO may not meet specific requirements. The VBA API allows you to
     extend CREO’s capabilities or develop new custom features. For instance, you could add a custom model check
     feature that only operates under certain conditions.

3.  Data Processing and Analysis:
   - VBA can easily handle tasks related to extracting and analyzing model or drawing data. For example, you can
     write scripts that automatically calculate the physical properties of a model and export the results to an Excel file.

4. Flexible User Interface Implementation:
   - With VBA, you can customize the user interface (UI). This enables you to add custom buttons, menus, and forms that
     help users perform their tasks more conveniently.

5. Integration with Other Software:
   - VBA is advantageous for integrating with other software like MS Office. This allows you to automate tasks such as
     exporting data from CREO to Excel or Word, or importing external data into CREO.

6. Ease of Learning and Maintenance:
   -  VBA is a relatively easy programming language to learn, and many users have basic coding knowledge.
      This makes maintenance and code modification relatively straightforward.

7. Efficient Resource Management:
   - Automating specific processes using the CREO VBA API can reduce the time spent on manual tasks and minimize
     errors, leading to more efficient use of resources.

For these reasons, the CREO VBA API can be a powerful tool for CREO users, enabling them to perform tasks more quickly and efficiently while implementing customized solutions.


Step 1: Install Creo VB Options

Step 2: "pro_comm_msg.exe" file Window path preference|

  • pro_comm_msg.exe file path "C:\PTC\Creo 6.0.6.0\Common Files\x86e_win64\obj\pro_comm_msg.exe"
  • The role of pro_comm_msg.exe is to communicate with Creo.

 

Step 3: Register the COM Server

Run the file " vb_api_register.bat " located in <creo_loadpoint>/Parametric/bin in administrator mode.
Now, whenever an application tries to call Creo using a command from this API, the server will be started automatically.

caution) " vb_api_unregister.bat " removes the COM server registration

 

Step 4:  Setting Project References For the VB API

You must select this every time you start a development project. You must check this to use the function.

 

After performing the above procedure, the VBA API program installation and setup is complete.

 

 

Setting up the VBA API 환경 설정

■ VBA API 필요성 반복적인 업무를 프로그램으로 처리하여, 좀더 생산적이고, 부가 가치가 높은 업무에 노력을 투입하십시요 Creo는 다양한 개발 도구를 제공 합니다. Pro/program, VB, VBA, JAVA, C## API를

tool-2020.tistory.com