03-16-2023
08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-16-2023
08:04 AM
@WCrihfield Your are absolute right. (This is not the first time I do this wrong....) the code should look more like this:
Sub Main()
Dim doc = ThisDoc.Document
res(ThisDoc.Document)
doc.Update2()
End Sub
Sub res(doc As Document)
If (doc.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject) Then Return
Dim aDoc As AssemblyDocument = doc
If (aDoc.ComponentDefinition.IsModelStateMember) Then
aDoc = aDoc.ComponentDefinition.FactoryDocument
End If
Dim occs As ComponentOccurrences = aDoc.ComponentDefinition.Occurrences
For Each occ As ComponentOccurrence In occs
occ.Unsuppress()
res(occ.Definition.Document)
Next
End Sub
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com