Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

iLogic form API access

Anonymous

iLogic form API access

Anonymous
Not applicable

Is is possible to access the iLogic form properties of a parameter through an iLogic rule?

I wish to change the 'Allow Custom Values' property on "Inlet O/D" parameter based on the value of another parameter.

ilogic form properties.jpg

For example, in super high pseudo code:

If tfINLET_OD = True Then

        myForm.Parameter("INLET_OD").Properties.AllowCustomValues = True

Else

       myForm.Parameter("INLET_OD").Properties.AllowCustomValues = False

End If

0 Likes
Reply
546 Views
4 Replies
Replies (4)

bradeneuropeArthur
Mentor
Mentor
Think this is not supported. I have searched for a while too.
I am curious of the result.
This is one of the disadvantages of I logic.
Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

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: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 !

0 Likes

philip1009
Advisor
Advisor

Changing properties of Forms is not possible with iLogic, however, you may have seen another property called "Enabling Parameter Name", this allows you to enable control of this element of the form with a Boolean (True/False) in your User Parameters, I typically just put an "F_" at the beginning the matching parameter name so I know this parameter is for Form control, then select the boolean parameter from the drop down list in the form edit.

 

What I typically do is write a different rule called "Form", and used Event Triggers to run the rule on every Model Parameter Change so when a parameter in the form is changed the rule runs and changes the boolean parameter to False to disable user entry.

 

If tfOUTLET_OD = False Then

     F_tfINLET_OD = False

ElseIf tfOUTLET_OD = True Then

     F_tfINLET_OD = True

End If     

0 Likes

Anonymous
Not applicable

Thanks for your input, however its not the enabling/disabling of the parameter I am looking to change. I always want the parameter to be enabled.

 

Its the ability for the end user to enter a custom value that's not part of the multi-value list, based on the condition of a Boolean parameter.

 

I'm currently getting around it by having a separate parameter (i.e. CustomINLET_OD) and using the boolean to enable/disable this and the standard INLET_OD oppositely. But it'd be a lot cleaner if I could just access the Form properties as mentioned and have only one parameter.

0 Likes

philip1009
Advisor
Advisor

The only other solution to get a form that operates exactly the way you want it to is make it in Visual Studio Express (which is free), then under the Wizards tab in the iLogic code editor is a button called Create Rule for a Dialog.

 

Here's a playlist of tutorials on Visual Studio and Visual Basic itself:

https://www.youtube.com/watch?v=mM3zB3QWuv8&index=1&list=PLC601DEA22187BBF1

 

Here's a video showing how to use the Create Rule for a Dialog Wizard to add the VB Form to your iLogic rule:

https://www.youtube.com/watch?v=eS7Ua_xtbyE&t=3349s

 

Good luck.

0 Likes