PARTHIBAN KANNAN

Think Special… Do Special…

How to Install, Register, & Configure Creo VB API Toolkit component in Creo Parametric

[sgrb_review id=1]For those trying to CAD Automation in Creo using VB API, here is your first article.,you must read before a start. you need to install VB API along with Creo, Register your batch file and also you need to configure your PC for VB API works. Let us see how to make this.

INSTALLATION:

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

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS141739&lang=en&source=snippet

(Or)

Follow below procedure to Install VB API Toolkit component while installing Creo first time OR to add 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

    Creo Installation

  3. Accept License and Export Agreement
  4. Complete License Identification
  5. Select 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.

    Select VB API

  6. Complete the Installation.

REGISTER

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 2.0 /Parametric /bin Folder
  4. Search the file named vb_api_register.bat
  5. Run that file in administrative mode

{Administrative mode is mandatory}

  1. Now the Command prompt will open.
  2. Please wait until the Command prompt will close automatically {It will not take more than 30 seconds}.
  3. Yeah, you are ready to configure your PC Now.

CONFIGURE

To use VB API you need to configure your PC Environment Variables.

  1. Go to the My Computer then right click and open properties
  2. Click the Advanced system settings

Advanced System Settings1

  1. Select the Advanced tab and Click the Environment variables

Advanced Tab

  1. Click the New  button in User variable

New User Variable

  1. Type PROE_INSTALL_PATH at Variable name
  2. Type Creo installation path at Variable value

Path may look like this

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

TIPS:

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

  1. Go to the Folder location where do you want short path name
  2. Press Shift+ Mouse Right Click Button
  3. Select Open Command Window here
  4. Type for %I in (.) do echo %~sI
  5. Copy the Short path Name from command prompt & paste this name in Environmental Variable value
Windows Short Path Name

How to get the windows short path name

 

The path may look like this

C:\PTC\CREO2-~3\CREO2~1.0\COMMON~1\M120

Edit User Variable

PRO_E_INSTALL_PATH

  1. Click OK to Complete the User variable
  2. Create one more user variable with the Name “PRO_COMM_MSG_EXE” and with the Value of pro_comm.exe location path. Path may look like this

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

  1. Follow the same procedure to create the System variable for both PROE_INSTALL_PATH and PRO_COMM_MSG_EXE
  2. Click OK

That’s all, Now you are ready to use VB API for Creo Automation

See more comments about this article from PTC Community

https://www.ptcusercommunity.com/thread/142126