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: 

Protect iLogic-form from entering wrong entry/parameter

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
miechh
774 Views, 4 Replies

Protect iLogic-form from entering wrong entry/parameter

I was wondering, is it possible to let the iLogic form eliminate wrongly entered values and replace it with the previous (correct) value, before the model gets updated? My iLogic-form has a text field in which the user should enter a number that's multiplyable by 4. I tried to do this by setting the field to a 'slider'-control, with a minimum of 8, a maximum of 32 and stepsize 4. But still it's possible to enter any other number in the field. I'm missing some sort of multi-value-list, like in the parameter-list of the part. That would also be a solution. The strange thing however is that I created a multivalue-list for this parameter in the parameter list, but the iLogic form doesn't adopt this multivalue list.

 

Any help is greatly appreciated.


Product Design Suite 2024
Inventor 2024 (v 28.20.27200.0000), Vault Basic 2024
Fusion 360
HP Workstation Z4
Intel Xeon 3.4GHz
32GB RAM
Windows 10 Professional (64bit)
4 REPLIES 4
Message 2 of 5
JoAnn_Hogan
in reply to: miechh

Hi There,

 

Would you mind sending me your part so I could have a look at your rules? If you dont want to post sensitive content I could send you my email address in a private message if that would help

If this post solved your issue please mark as solved and Kudos are always welcome 😃

Jo - Ann
Twitter: @JoAnn_Hogan
Revit Architecture Certified Professional / Revit Structure Certified Professional / AutoCAD Certified Professional
Message 3 of 5
danvang
in reply to: miechh

Most likely when you created the form the parameter was not a multi-value parameter. So now that it is, the form is not showing the list. All you have to do is edit the form and delete the parameter and place it back in. you should now have a list.

 

You can probably write a rule to check that value. But you will need another parameter to store the previous value. Here's a quick and dirty rule. Length and LengthOld are parameters.

 

If Length Mod 4 = 0 Then
    LengthOld = Length
Else
    Length = LengthOld
End If

 

Hope that helps.

 

Dan

** If my reply resolves this issue, please choose "Accept as Solution" **
Dan Vang
Message 4 of 5
JoAnn_Hogan
in reply to: danvang

You can also insert a rule that when somebody inserts a wrong value it will give you a dialog box saying the value is incorrect and wont accept the value. You can also say in the rules something in the line of "Only values between 4 and 37 accepted"

If this post solved your issue please mark as solved and Kudos are always welcome 😃

Jo - Ann
Twitter: @JoAnn_Hogan
Revit Architecture Certified Professional / Revit Structure Certified Professional / AutoCAD Certified Professional
Message 5 of 5
miechh
in reply to: danvang

The solution of removing the parameter from the iLogic form and adding it back again did the trick. Thanks!

Product Design Suite 2024
Inventor 2024 (v 28.20.27200.0000), Vault Basic 2024
Fusion 360
HP Workstation Z4
Intel Xeon 3.4GHz
32GB RAM
Windows 10 Professional (64bit)

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

Post to forums  

Autodesk Design & Make Report