09-09-2022
09:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-09-2022
09:14 AM
Hi @lhintonC3ZNZ. For starters, change this:
Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveDocument
...to this:
Dim oDoc As PartDocument = ThisDoc.Document
I believe what is going on in this situation is the code is targeting the main assembly, because it is the 'active' document in that situation, instead of the part you area creating. This change will force the code to target the local document (the document that the rule is saved within.).
Wesley Crihfield
(Not an Autodesk Employee)