- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm currently working on a project where we use the same part multiple times through different sub assemblies of the same main assembly, and when we do the part details we put the part QTY native sub-assembly they're tied to.
i.e - one sub-assembly would have QTY-5, another would have QTY-10 etc.
what I've been trying to do, is make a code (with snippets gathered from these forums) that would go through the main assembly, find all the occurrences of common parts throughout the sub-assemblies and stack those quantities as separate custom iproperties at the part level.
See below screenshot for desired outcome. The code i've cobbled together works in 2 parts. the 1st gives the 'PartQty' custom iproperty, and the 2nd gives the 'MultiAssy' custom iproperty.
This method can do the job if there's only 1 more sub-assembly where the part occurs, but any more than one and the 'MultiAssy' value gets overridden.
Ideally, I'd like the 'MultiAssy' iprop to take the name of the assembly its being linked to so it's easy to see which total to call up during detailing. But i'm not sure if that's being to greedy at this point.
I've attached both snippets of code i've mentioned above, if anyone better versed could give some assistance it would be greatly appreciated
@WCrihfield I've seen your name pop up in a few of these threads. any chance you could have a peek?
Solved! Go to Solution.