How to Install, Register, & Configure Creo VB API

How to Install, Register, & Configure Creo VB API

Here is the first step to being CAD automation in Creo VB API. The fundamental things to complete before starting automation is

  1. Install Creo VB API along with Creo
  2. Register the API batch file
  3. Configure the windows environment

1. Installing Creo VB API

If you have PTC account, you can directly access the PTC article to install VB API with this link.

Otherwise, follow the below procedure to Install VB API while installing Creo first time or adding it to an existing Creo Installation.

  1. Run setup.exe from Creo DVD to launch PTC Install Assistant
  2. Select the Task as Install new software
  3. Accept License and Export Agreement
  4. Complete License Identification
  5. Select the Customize button on the Application Selection page and select the component VB API for Creo Parametric under API Toolkits as shown in the image below
Creo VB API Selection while installing Creo
VB API Selection while installing Creo

6. Complete the Installation.

2. Registering API

Follow the below procedure to register VB API with CREO 

  1. Please ensure all the Creo parametric process are not running
  2. Go to the PTC Installation folder
  3. Go to → PTC /Creo {version} /Parametric /bin Folder
  4. Search the file named vb_api_register.bat
  5. Run that file in administrative mode {Administrative mode is mandatory}
  6. Now the Command prompt will open.
  7. Please wait until the Command prompt closes automatically {It will not take more than 30 seconds}.
  8. Now, we are OK to configure the Windows environment.

3. Configuring Windows Environment

To use VB API, configure the PC Environment Variables.

  1. Go to the My Computer then right click and open properties
  2. Click the Advanced system settings
  3. Select the Advanced tab and Click the Environment variables
Environment Variable in Advanced Tab - Creo VB API
Environment Variable in Advanced Tab

4. Click the New button in the User variable

Add new user variable
Add new user variable

5. Type PROE_INSTALL_PATH at Variable name

6. Type Creo installation path at Variable value

The path may look like this

C:\PTC\Creo2-amd64-M180\Creo 2.0\Common Files\M120

TIPS: Use short-path name instead full path name

Use DOS short path name for variable value to avoid some other windows path issues.

6. Open Command Prompt

7. Change directory to Creo Installation folder Common File Path and Press Enter

8. Enter short-path command  for %I in (.) do echo %~sI and Press Enter

9. Copy the Short path Name from command prompt & paste this name in Environmental Variable value

Get Windows short-path name - Creo VB API
Get Windows short-path name

The updated user variable looks like this

New user variable - CREO_INSTALL_PATH
New user variable – CREO_INSTALL_PATH

10. Click OK to Complete the User variable.

11. Create one more user variable with the Name “PRO_COMM_MSG_EXE” and the Value of the pro_comm.exe location path. The path may look like this,

C:\PTC\Creo2amd64M120\Creo2.0\Common Files\M120\x86e_win64\obj\pro_comm_msg.exe

12. Follow the same procedure to create the System variable for both PROE_INSTALL_PATH and PRO_COMM_MSG_EXE

13. Click OK

Now the system is ready to use VB API for Creo Automation.

Leave a Reply

Contact Us