Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic rule triggers

8 REPLIES 8
Reply
Message 1 of 9
c.rp.henderson
689 Views, 8 Replies

iLogic rule triggers

I''l start by explaining my setup before the problem:

Top Level

  • Can contain between 1 to 4 assemblies that are all different from one another.
  • Contains an iLogic form with various drop-down options.
  • Contains an iLogic rule (Placement Rule) that changes the number of assemblies by deleting them first then places the new amount using auto generated iMates.
  • Contains another iLogic rule (Data Rule) that passes numerical parameter values, based on the selected drop-down options, to a file that is linked to every single part and assembly, which I will call the Data Part.

Top Level Sub Assemblies

  • Contain an iLogic rule (Configuration Rule) that replaces its sub-assemblies, driven by the numerical values from the Data Part.

All other assemblies/parts

  • Contains iLogic rules that suppress features, change parameter values, change materials etc etc

 

The Problem

When a drop-down option is changed, the Data Rule is triggered, which changes all the numerical values in the Data Part, which in turn triggers the Configuration Rule in any top level sub assemblies.

 

What I'm finding is that when an sub-assembly is replaced by the Configuration Rule, the parts inside newly placed sub-assembly require their iLogic rules to be run manually for any of the optional changes to take effect.

 

I am assuming the reason for this is that they are not present in the model when the numerical values of the Data Part were changed, so there is nothing triggering their rules to run.

 

Has anyone experienced a similar issue, knows of a work around or a change to the workflow to overcome it?



Craig Henderson
Inventor Pro 2018.3.3, Build 284 / Vault Pro 2018 / Visual Studio 2012 / Excel 2013
8 REPLIES 8
Message 2 of 9

Hello,

 

what I do is only replace standard parts, they don't change, so no need to run rule there.

 

why not put All assemblies in your sollution, and turn of the one's you don't need, then they will be there for the updat

 

what I did recently, was in the main assy create a rule that loops throug all components. in some components that needed parameter/properties changes, I put in a property with a value. when the loop runs in to one of those properties , depending on the value it changes some, at least one property. after that the component is updated with the "any property change" trigger.

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


Message 3 of 9

Hi,

My suggestion to you is to take control over in which order the rules run.
In almost every rule you should have the option to "Don't run automatically"
Then use RunRule to set the order.

/Rikard
Message 4 of 9

Thanks for you responses.

 

I used to take the approach of putting all my assemblies in the model and suppress what I don't need, but it made the models very heavy/slow to use and in order to have an accurate BOM I had to also set the BOM reference. It may just be me, but I hate working will a level of detail, it doesn't seem fit for purpose when used with iLogic to control the BOM.

 

I'm experimenting with iAssemblies just now, are they good for this kind of application? what are its pitfalls?



Craig Henderson
Inventor Pro 2018.3.3, Build 284 / Vault Pro 2018 / Visual Studio 2012 / Excel 2013
Message 5 of 9

Hi,

 

We have tried to use both Suppress and iPart/iAssemblies before..

In my opinion these 2 solution does not work very well..

LoD is only working for to level components.

 

Setting parts to Reference and Visible=False is might something that would work.

 

We have tried 2 different ways to solves these kind of problems.

First one is hard.. Use API to place components. (This is the one that we are using our self)

 

Second one is a little bit easier but not as good as the first one..

It's a tecnique that we call "NoPart" and it's basiclly using one single and very small part that we have set as Reference in Document Settings.

And switch between that little part and a component by using Replace. This is much better than using Suppress..

We call it "NoPart" because we named our little part to NoPart.ipt..  🙂

 

/Rikard

Message 6 of 9

I'm using the API to delete and place components using iMates, I really like it as it keeps the model light and there's no worrying about what is visible/invisible or incorrect BOM references. However it's no use if the parts that are placed need their rules run manually after placement :@

I began using the RunOther rule, but it just becomes another thing to manage.



Craig Henderson
Inventor Pro 2018.3.3, Build 284 / Vault Pro 2018 / Visual Studio 2012 / Excel 2013
Message 7 of 9

Hi,

 

I don't understand if you have more problem.. (English is not my first language.)

You should not have to run them manually if you do it right. 

 

RunOther in Document should take care of that problem..

 

SyntaxEditor Code Snippet

iLogicVb.RunRule("PartA:1", "ruleName")

 

 

/Rikard

Message 8 of 9

I wish not to have to explicitly list part names and their rules. It then becomes something else that needs to be managed/kept up to date in the code.

I had hoped Inventor could recognize the parameters in the replacement parts had changed and ran their respective rules.



Craig Henderson
Inventor Pro 2018.3.3, Build 284 / Vault Pro 2018 / Visual Studio 2012 / Excel 2013
Message 9 of 9

Hi,

If you have the occurrence names same and you have one "MasterRule" in every sub assembly that drives all the rules inside sub.
Then you don't need to have control.

/Rikard

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report