Skip to main content
1-Visitor
May 9, 2016
Question

How to get session id of a model using VB API

  • May 9, 2016
  • 1 reply
  • 2319 views

How to get session id of a model using VB API

1 reply

16-Pearl
May 9, 2016

Hi Mohit,

     You can get session ID by

Public AConnection As IpfcAsyncConnection

Public BSession As IpfcBaseSession

Public SessionID As String

If Not AConnection Is Nothing Then

      AConnection = CConnection.GetActiveConnection.GetConnectionId

Else

AConnection = New CCpfcAsyncConnection).Connect(Nothing, Nothing, Nothing, Nothing)

End If

SessionID = AConnection.GetConnectionId

You can access only one CREO connection via vb api, after got connection from creo you can use more than one creo session, VB API Stores the connection ID in Memory, It can only access previous CREO which already connected

mdutta1-VisitorAuthor
1-Visitor
May 10, 2016

Hi Parthiban,

                 Thanx for your reply. but I want to get session ID of each component which is added in the model tree. using VB API

Thanx

Mohit

16-Pearl
January 31, 2017

Hi Mohit,

    I think you're expecting Model Relation ID (i.e → ID of the components which placed in Assembly).