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 form API access

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
548 Views, 4 Replies

iLogic form API access

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

4 REPLIES 4
Message 2 of 5
bradeneuropeArthur
in reply to: Anonymous

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 !

Message 3 of 5
philip1009
in reply to: Anonymous

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     

Message 4 of 5
Anonymous
in reply to: philip1009

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.

Message 5 of 5
philip1009
in reply to: Anonymous

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.

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

Post to forums  

Autodesk Design & Make Report