- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @b.mccarthy. Here is something you may be able to use. I took what you said in Message 11 literally (all parts in an assembly), which I understood as [only run this process on the part documents, not on any sub assembly type documents], so I hope that was you intent. If not, and you want it to run on all referenced documents, not just parts, then that can be changed by getting rid of Lines 23 & 24. Also, I was not sure if you wanted the routine applied to the main assembly itself, or only its referenced documents, so, I have a line of code in there (Line 18) commented out, which would be running the process on the main assembly document itself, before running it on the referenced documents. I did not incorporate a document type check at the start of this rule, so it could be ran on an assembly, part, or drawing. However, if ran on a Part, you would want to uncomment Line 18. I was not sure how to handle that situation. We could add some additional design intent in there, such as...if the 'main' document is a part, then run that line, else if it is an assembly or drawing, then do not run it. As before, you will need to change Lines 13-15 as needed, or add/delete some lines in that area for more or less external rule names. There is no 'feedback' designed into this code process, but I left the comments in there.
Wesley Crihfield
(Not an Autodesk Employee)