Using Parameters to control Form properties?

Using Parameters to control Form properties?

Anonymous
Not applicable
1,895 Views
6 Replies
Message 1 of 7

Using Parameters to control Form properties?

Anonymous
Not applicable

To expand upon the title, I want to control say, the max for a slider on a form with a parameter instead of a static number.

Capture.PNG

As you can see I have a Height parameter and I want to input it as the max value for a slider on a form

 

Capture1.PNG

 

Unfortunately I get this error. Is there anyway to input a parameter into a form property? 

 

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

kelly.young
Autodesk Support
Autodesk Support
Accepted solution

Hello @Anonymous I see that you are visiting as a new member to the Inventor Forum.
Welcome to the Autodesk Community!

I don't know of a way to control the Min and Max of a slider by rule, it seems a parameter of MAX will not work in the input "MAX is not a valid value for Double." 

 

You can set it up to give an error and limit the size but not with a slider:

Define Min/Max of iLogicForm Slider with paramters

 

There is a limit range that will allow the slider but not go below the set values:

Slider.JPG

Limiting the Range of a parameter in Inventor Professional

Slider.gif

Hope that helps!

 

Please select the Accept Solution button if a post solves your issue or answers your question.

Message 3 of 7

johnsonshiue
Community Manager
Community Manager

Hi! Kelly's workflow is brilliant. I think this is the only way to have a dynamic range. I am marking his replay as the solution.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 4 of 7

Anonymous
Not applicable

Thanks for the reply.  Using iLogic to limit sliders is what I ended up doing, but I have some parameters that are very variable and it seemed to defeat the purpose of a slider to have a 50 unit slider that only used 10 and vise versa.

Message 5 of 7

kelly.young
Autodesk Support
Autodesk Support

@Anonymous I think this is just a limitation in the slider properties.

 

If you want to submit at Inventor ideas and post back here I'll give you the first vote. 

 

Please select the Accept Solution button if a post solves your issue or answers your question.

0 Likes
Message 7 of 7

SharkDesign
Mentor
Mentor
Accepted solution

I've been doing pretty much the same as the link above but I also add in a messagebox otherwise the user doesn't know why the slider keeps jumping to a value they did not select. 

 

If Parameter < ParameterMin Then

Parameter = ParameterMin

MessageBox.Show("Value Too Small." & vbCrLf & "Reset To Minimum.", "Min/Max", MessageBoxButtons.OK, MessageBoxIcon.Stop)

ElseIf Parameter > ParameterMax Then

MessageBox.Show("Value Too Big." & vbCrLf & "Reset To Max.", "Min/Max", MessageBoxButtons.OK, MessageBoxIcon.Stop)

Parameter = ParameterMax

End If

 

Another option if you only have ten possible outcomes is to just add all ten values as a multivalue parameter, then use a drop down instead of the slider. Then it doesn't even need to calculate min and max. Unless of course this changes. 

  Inventor Certified Professional