Ilogic code that monitors if there's a change in parameters I ask it to monitor, then acts

Ilogic code that monitors if there's a change in parameters I ask it to monitor, then acts

smeyer
Participant Participant
775 Views
6 Replies
Message 1 of 7

Ilogic code that monitors if there's a change in parameters I ask it to monitor, then acts

smeyer
Participant
Participant

Hello,

 

Long time lurker, first time poster. 

 

I'm looking into whether there is ilogic code such that it monitors a series of parameters and if one is altered it then continues to do ilogic things based on the value of the changed parameter. Similar to how if a user parameter is referenced in an ilogic, and is changed, the ilogic fires, but if other parameters change the illogic rule doesn't run. I want to reference several user parameters and if one changes, the code goes from there. 

 

Why?

 

Lets say I have an Ipart and it's referenced by 3 separate top level assemblies, so I have 3 members in the i-table. I have written code that handles application of a pattern on the part and the pattern varies based on length, each member m1, m2 & m3 have different lengths. Each member length is currently driven by a unique Length parameter in the top-level assemblies, Length1, Length2, Length 3. In the I part I also have corresponding length parameters being driven by the top level assemblies. These parameters are not linked through the parameter control module but driven by a configuration rule in the assemblies.  I have the code working and from each top level I can drive lengths and patterns are controlled appropriately. But at the ipart level, the only way I could think to do that was to have 3 separate rules specific to each top level assembly with their specific Length parameter referenced in that rule.

 

All three of the rules are driving the same parameters of the same pattern so it seems a little bulky. If theres a code that says something along the lines of " If Length1 changes, run rule using Length1 value, If Length 2 changes, run rule using Length2 value, etc."  Then I can have 1 rule controlling inputs from the top levels. 

 

The rest of my ilogic code changes I-table values and I have that all squared away and fine, but its all based on the Length value. Company policy won't let me share the code.

 

Any tips or tricks appreciated! Thanks for your time!

 

-Shane Meyer

 

 

 

0 Likes
Accepted solutions (1)
776 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I don't know for ilogic but for Vb.net and the Inventor there are Events that launch if a parameter has changed OnParameterChangeEvent.

 

This would to the trick easily for you, but then you are talking about an add-in for Inventor!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 7

smeyer
Participant
Participant

Ok thanks!

 

i'm using Visual studio to write a plug-in currently and this gives me a path to explore.

0 Likes
Message 4 of 7

bradeneuropeArthur
Mentor
Mentor

You need help?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 7

smeyer
Participant
Participant

I am currently working through this "My first Inventor Plugin" Tutorial https://knowledge.autodesk.com/search-result/caas/simplecontent/content/my-first-inventor-plug-overv...

 

I have some rules I wrote where I'd like to be able to click a button in the tool bar, prompt the user for input parameters, the plugin then applies the parameters to an i-logic rule stored as a string within the vba.net code or references a text file and re-writes it, then imports that rule into the part document where it will live on and be driven by a parameter such as length controlled from an assembly level. 

 

I have figured out how to achieve pretty much all of these individually, am now working on bringing it all together.

 

I took programing classes and a VBA.net class in college (I am an ME), but that was a couple years ago and I'm spending a lot of time re-familiarizing myself with coding and learning what inventor wants.

 

If you are practiced in i-logic and VBA and don't mind being a resource I can bounce a question off of here and there, I'd greatly appreciate it!

Message 6 of 7

bradeneuropeArthur
Mentor
Mentor
Accepted solution

I am willing to help you.

One tip in advance:

Try to avoid mixing VBA and Vb.net and for sure with I-logic.

Try to do it only with Vb.net and you will see have flexible and you are, more than with i-logic.

 

Let me hear (a private message is also ok) if you have questions!

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 7

smeyer
Participant
Participant

Duly noted,

 

Thanks!

0 Likes