cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How does one either create a new assembly or erase a part from the VB API

JamesCoons
1-Newbie

How does one either create a new assembly or erase a part from the VB API

I need to be able to programattically loop through a directory and generate images of the parts in the directory.

If I start with an existing empty assembly, I can load a part and generate the image.

However I can not seem to programmatically create a new empty assembly. Nor can I erase the part I have just loaded

to get back to the empty assembly I started from. All of my attempts at this throw exceptions.

Does anyone have any ideas?


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.
1 REPLY 1
ldutoit
5-Regular Member
(To:JamesCoons)

Private

Sub createAssy

Dim

mdl As IpfcModel

Dim

session As IpfcBaseSession

session = asyncConnection.Session

If

asyncConnection Is Nothing OrElse Not asyncConnection.IsRunning

Then

msgbox("No Connection is present to any Creo Parametric Session")

Exit Sub

End If

mdl = session.CreateAssembly("NewAssembly")

end sub

Top Tags