Hi @xAce20159. Since this can be a complicated subject to look into, and there are several very similar sounding terminology, it would be best if you included a good screen captured image of what you are talking about. It would also be very helpful if you fully described the manual steps you took to include that object into your assembly. That will tell us more about what type of object it is, and how to look for it. There are already some code examples above showing how to look into certain types of things labeled as 'imported' in an assembly, but we can certainly expand on those examples, or include new examples, if needed.
Below is another similar iLogic rule example for exploring similar stuff in an assembly, but it is designed to write its findings out into the iLogic Log window. However, the iLogic Log window must already be visible before running this rule, or it will not be able to capture the feedback. Then, after running it, check within the iLogic Log window for the results, if any.
Sub Main
Dim oADoc As AssemblyDocument = TryCast(ThisDoc.Document, Inventor.AssemblyDocument)
If oADoc Is Nothing Then Logger.Debug(iLogicVb.RuleName & " exited (no AssemblyDocument obtained)") : Return
Dim oICs As ImportedComponents = oADoc.ComponentDefinition.ImportedComponents
If oICs.Count > 0 Then
For Each oIC As ImportedComponent In oICs
Dim sFDN As String = String.Empty
Try : sFDN = oIC.ReferencedDocumentDescriptor.FullDocumentName : Catch : End Try
Logger.Info(vbCrLf & "FullDocumentName = " & sFDN & vbCrLf & _
"IsLinkedToFile = " & oIC.LinkedToFile & vbCrLf & _
"IsEmbedded = " & oIC.IsEmbedded & vbCrLf)
Next oIC
End If
Dim oOccs As ComponentOccurrences = oADoc.ComponentDefinition.Occurrences
For Each oOcc As ComponentOccurrence In oOccs
Dim sFDN, sFFN As String, bIsEmbedded, bIsLinked As Boolean
If oOcc.IsAssociativelyImported Then
sFFN = oOcc.AssociativeForeignFilename
Logger.Info(vbCrLf & "Occurrence named " & oOcc.Name & vbCrLf & _
"IsAssociativelyImported = True" & vbCrLf & _
"AssociativeForeignFilename = " & sFFN & vbCrLf)
ElseIf oOcc.HasAssociativeImportedComponent Then
Dim oIC As ImportedComponent = oOcc.ImportedComponent
Try : sFDN = oIC.ReferencedDocumentDescriptor.FullDocumentName : Catch : End Try
Logger.Info(vbCrLf & "Occurrence named " & oOcc.Name & vbCrLf & _
"HasAssociativeImportedComponent = True" & vbCrLf & _
"FullDocumentName = " & sFDN & vbCrLf & _
"IsLinkedToFile = " & oIC.LinkedToFile & vbCrLf & _
"IsEmbedded = " & oIC.IsEmbedded & vbCrLf)
End If
Next oOcc
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)