Skip to main content
1-Visitor
March 10, 2015
Question

VB API Tool Kit for Assembly Drawing from Part Drawing

  • March 10, 2015
  • 0 replies
  • 1236 views

What needs to be modified in the existing VB Program syntax to refer
assembly drawing since original API Kit was developed to refer part model
drawing.

Note: API Kit is working well for part model drawings. Refer below for the
coding which created to read part model in the drawing.

DimasyncConnection As IpfcAsyncConnection = Nothing
Dim conn As CCpfcAsyncConnection
Dim session As IpfcBaseSession
Dim model As IpfcModel
Dim assembly As IpfcAssembly
Dim tableOwner As IpfcTableOwner
Dim tables As IpfcTables
Dim table As IpfcTable

conn= New CCpfcAsyncConnection
asyncConnection = conn.Connect("", "", ".", 5)
session = asyncConnection.Session
model = session.CurrentModel
assembly = model
tableOwner = assembly
tables = tableOwner.ListTables
table = tables.Item(0)

Here is the sample code. I am trying to chenge the assembly drawing.

I am getting some exception. I have attached the exception.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.