01-05-2021
01:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-05-2021
01:08 PM
if you run the rule from an assembly then "ThisApplication.ActiveDocument" will return the assembly document. You will need to get the part document object. From the code you gave i cant tell how you want to do that. But if you want to convert all part documents you could try the code below
Dim doc As AssemblyDocument = ThisApplication.ActiveDocument For Each refDoc As Document In doc.AllReferencedDocuments If refDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then ThisApplication.ActiveDocument.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" End If Next
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