Hi Georg,
A colleague has this suggestion:
>> >>
The users want to delete bolt connection and keep the holes through Inventor API. Please correct me if I am wrong.
From my side, we just need delete the bolt connection by API. Actually, Bolt Connection is a ComponentOccurrence object from viewpoint of API. Below is sample code.
Dim oCompOcc As ComponentOccurrence
Set oCompOcc = oAssyDoc.ComponentDefinition.Occurrences.Item(3)
Call oCompOcc.Delete
<< <<
I used similar code and I see the bolted connection is deleted and the holes remain in the part. To test this just have the bolted connected selected.
Public Sub SelectTest()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
If oDoc.SelectSet.count > 0 Then
Dim oObj As Object
Set oObj = oDoc.SelectSet(1)
Dim oCmpOcc As ComponentOccurrence
Set oCmpOcc = oObj
Call oCmpOcc.Delete
End If
End Sub
I do notice that after the bolted connection ComponentOccurrence is deleted by API the hole in the part has attributes that seem to be related to bolted connection. I believe your code could safely delete these attributes as well.
Thanks,
Wayne
Wayne Brill
Developer Technical Services
Autodesk Developer Network