- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to make add in with a code below, I bit of have idea where I got the isuue but don't have solution for that.
Please help if someone can.
The iLogic code working fine but it dosen't catch the feature through vb.net.
Private Sub m_sampleButton_OnExecute(Context As NameValueMap) Handles m_sampleButton.OnExecute
'MsgBox("Button was clicked.")
Dim asmDoc = g_inventorApplication.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = g_inventorApplication.ActiveDocument.ComponentDefinition
Dim oOccurrence As ComponentOccurrence
'Dim Part As PartDocument = g_inventorApplication.PartDocument
Dim oPdef As PartComponentDefinition = g_inventorApplication.ActiveDocument.ComponentDefinition
Dim Feature As PartFeature = oPdef.Features
For Each oOccurrence In oAsmCompDef.Occurrences
'MsgBox(oOccurrence.Name)
If oOccurrence.Name.Contains("Improved 80mm") Then
'oOccurrence.count
MsgBox(oOccurrence.Name)
Feature.IsActive(oOccurrence.Name, "Revolution1") = False
Feature.IsActive(oOccurrence.Name, "Rectangular Pattern1") = False
End If
If oOccurrence.Name.Contains("Improved Guide Corner") Then
MsgBox(oOccurrence.Name)
Feature.IsActive(oOccurrence.Name, "Revolution1") = False
Feature.IsActive(oOccurrence.Name, "Circular Pattern1") = False
End If
Next
End Sub
Bhavik Suthar
Solved! Go to Solution.