Rule Arguments while using Form

Rule Arguments while using Form

Maxim-CADman77
Advisor Advisor
532 Views
6 Replies
Message 1 of 7

Rule Arguments while using Form

Maxim-CADman77
Advisor
Advisor

Pretty sure the answer would be negative ... yet:
Whether it possible to have some rule arguments while using iLogic-form?
The goal is to pass some data from one ilogic rule called from the form to another rule?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
533 Views
6 Replies
Replies (6)
Message 2 of 7

FINET_Laurent
Advisor
Advisor

Hi @Maxim-CADman77,

 

Here is an article that might interest you : 

Pass parameters to an iLogic Rule - Manufacturing DevBlog (typepad.com)

 

Kind regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 7

Maxim-CADman77
Advisor
Advisor

Thank for your interest. I do use rules with arguments. I just don't understand whether it possible when using iLogic-Form.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 4 of 7

Michael.Navara
Advisor
Advisor

I'm not sure this is possible with iLogic forms (I'm afraid not), but this is possible with WinForms.

If you can accept this change, I can prepare a sample "how to".

 

0 Likes
Message 5 of 7

Maxim-CADman77
Advisor
Advisor

Thank you. No need in such sample (I believe I'm aware of what you mean). I just want to be sure I'm not missing some crusial thing about iLogic forms.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 6 of 7

WCrihfield
Mentor
Mentor

Hi @Maxim-CADman77.  It depends on several things, but yes, I do believe it is possible.  I assume you are talking about an iLogic Form (not some other type of Form), but is it an internal form or global form?  Are the rules that are to be ran internal or external?  Will the form be shown 'modal'?  How will the rule's be initiated to run (Event Triggers, param name trigger, iLogicVb.RunRule(), button(s) to run rules within the form, multiple ways)?  If you could describe the scenario you are hoping to achieve in more detail, that would help us determine more accurately if it is possible, and how to achieve it?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 7 of 7

WCrihfield
Mentor
Mentor

As a quick/simple example, I created a new part document, created two simple numerical user parameters in it, created two internal rules in it, and created one internal form in it.  The param named "Param1" is set to 5 (inches), the param named "Param2" is set to 1 (inches).  The first rule named "Rule1" simply creates a NameValueMap, adds a single name/value pair entry into it that is simply a modified version of the first parameter's name, and its value is the unquoted name of Param1, so that its value will be implied.  Then it uses iLogicVb.RunRule("Rule2", oMap), where "Rule2" is the name of the other internal rule, and oMap is the variable for the NameValueMap.  Then within Rule2, It simply sets the value of Param2 = the value retrieved from the RuleArguments NameValueMap entry that was sent to it, plus 3.  Then within the form, I drag Param1 over into the form, then drag Rule1 over right under that.  When I click on the Rule button, then check the Parameters dialog (while the form is still active/visible/open on my screen), and the value of Param2 has been changed from 1 to 8, which matches what I wanted to happen.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes