Is there a way to run a rule which is part of a sub assembly from the parent assembly?
I have a parent skeleton assembly containing many icopy assemblies. These subassemblies are based of one master assembly which in turn has a common part. (hence why I am using the icopy feature)
This standard part has an ilogic rule which varries the number of creases in a wall panel. eg. when the panel is 1200 wide there are 2 creases, when the panel is under 800 wide there is one crease and when the panel is less than 600 wide then there are no creases.
When I insert the icopy assembly into the master skeleton assembly and click select the widths of the panels they stretch and change to suit my skeleton. However I am having to visit each copied panel to run the crease rule.
Is there an operation or some sort of trigger I can implement to make this rule run as soon as the sub assembly is inserted?
There is a run rule in component snippet that you could use to create a rule that could loop through your component tree and run them. A better solution might be to play around with the iLogic triggers in the sub assembly document, try on open document.
Thank you Mike,
Tried looking at the triggers but nothing quite fits in with what I'm wanting to acheive. How do I go about trying the run rule in component snippet?
Got a little but further.
Using the "run rule in component does work", however I now need a way of linking the generated icopy assembly names into the "partA:1" within the rule.
Is it possible for you to post any of your files? I don't use iCopy, so I'll have to play around with your assembly to get some code that will loop through reliably.
I've attached 5 files.
1. Open Wall Assy.
2. Use iCopy and insert the Standard Wall Panel Assy.
3. Pick relevant points on skeleton.
4. Accept generated file names
In browser you should now have (under the icopy part) Standard Wall Panel Assy with skelton panel1:[x] & Standard Adaptive Panel1:[x]
The Creases Rule somehow needs populating with a captured part name. I don't want to have to keep visiting the rule and adding in the new part names. Maybe I need to create some form of external rule referencing the Standard Adaptive Panel?
If you set the creases rule to trigger on "before save", the rule fires when the top level assembly (and it's iCopy sub assemblies) gets saved. Does this work for you?
That does work.
Is there not a way you can get the rule to trigger using udpate within the assembly or create a rule another rule within the assembly to trigger the crease rule?
Rules are normally triggered when a parameter used in the rule is changed. If ther'es a parameter that will always change when the iCopy is placed then you could add that parameter in a redundant way to the rule.
Otherwise you'll have to use code at the assembly level, something like a loop that runs through each occurence in the assembly and looks for the parts to programmatically trigger the rules.
I think that the before save trigger is a good way to handle the problem, but if you want it to be triggered via code from the assembly for some reason (or just want an example of how it could be done) I can throw something together for you.
I will look into a parameter that will always change when the icopy is inserted and base a rule off that.
Access a broad range of knowledge to help get the most out of your products and services.