Create Connection ID in VB API

Create Connection ID in VB API

Create Connection ID

Connection ID is playing the important role in VB API application to connect the required Creo session from multiple Creo Session. Since VB API application can connect to one instance of Creo session at the time, it is important to Create connection ID to connect and reconnect the Creo

Syntax to Create Session ID

Create Connection ID – syntax

Function CCpfcConnectionId.Create  (ExternalRep as String) as IpfcConnectionId



The Creo Parametric session identification string.


The connection id handle.


  1. Declare the variable for IpfcAsyncConnection & CCpfcAsyncConnection
  2. Get Connection ID string from IpfcAsyncConnection
  3. Create Connection ID from CCpfcAsyncConnection

Sample Code

Create Connection ID from Creo Session ID String

Public AConnection As IpfcAsyncConnection
        Public CConnectionID As CCpfcConnectionId
             AConnection = CConnection.Connect(Nothing, Nothing, Nothing, 10)
            Dim ConnectionString As String = AConnection.GetConnectionId.ExternalRep.ToString()
            MessageBox.Show("Connection ID: " & ConnectionString & " Created", "Success")
        Catch ex As Exception
            MessageBox.Show(ex.ToString(), "Connection ID Creation Failure")
        End Try

Leave a Reply

Contact Us