Change user parameter equation for a global parameter

Change user parameter equation for a global parameter

jack6TKTR
Participant Participant
546 Views
8 Replies
Message 1 of 9

Change user parameter equation for a global parameter

jack6TKTR
Participant
Participant

Hi I'm new to iLogic, but I'm creating my first cabinet that is driven by a form, but I'm running into an issue. I have created user parameters for a cabinet that controls each solid thickness for left, top, bottom, right and back. I control it through a form. Is there a way to create a global thickness to reset those values, but still have a flexibility of independent adjustment?21.09.2021_08.57.42_REC.png

0 Likes
547 Views
8 Replies
Replies (8)
Message 2 of 9

jack6TKTR
Participant
Participant

Anyone care to help me out?

0 Likes
Message 3 of 9

WCrihfield
Mentor
Mentor

I assume this is a multi-body part file, and not an assembly, right?  Have you thought about making this a Template file, then setting each of those thicknesses to whatever default you want.  Then every time you click New, and choose this Template, all thicknesses will start out at the default thicknesses.  Then you can have the form pop-up automatically when it opens, so the user can immediately start to modify any values they want.  This would be one way of setting a standard thickness.  Another technique might be to have an iLogic rule that, when ran, sets all thickness related parameter values back to a value you specify in the rule, or to the value of another stable parameter.  This rule could either be ran manually, when needed, or triggered to run by one of the events listed within the Event Triggers dialog box.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 9

WCrihfield
Mentor
Mentor

I almost forgot to mention that you could also trigger this rule to run from a button in your form.  Within your iLogic Form Editor dialog, you can drag the name of an iLogic rule from the list in the upper left area (after clicking on 'Rules') over into your form design area.  It will then show up in the Form as a button.  When you click on that button, it will run the iLogic rule.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 9

jack6TKTR
Participant
Participant

Thanks, for the info. I will try to use the second route using iLogic rule. 

 

0 Likes
Message 6 of 9

Z0methink
Enthusiast
Enthusiast

See this.

0 Likes
Message 7 of 9

Z0methink
Enthusiast
Enthusiast

Better this:

0 Likes
Message 8 of 9

jack6TKTR
Participant
Participant

Thanks for the code, I will have to digest and see what I can do with it.

0 Likes
Message 9 of 9

WCrihfield
Mentor
Mentor

Hi @jack6TKTR.  I was just thinking about a very simple iLogic rule that would set the parameter values controlling those thicknesses back to a 'Global' or default value when you ran the rule.  You could have a separate parameter to use for this 'Global' or default thickness value or just specify something directly within the rule.  But if you use a parameter, you could include that within your form, if you wanted to.  Here is a very simple iLogic rule to simply reset the values of those thickness parameters back to a default value.  You will likely have to change the names of the parameters being specified within this rule to match what your actual parameter names are, before it will work for you.  Then just drag this rule over into your form, then you can simply click that rule button to reset all the parameter values back to their default.

'specify what to use as the 'Global' or default thickness value
'Dim oGlobalThickness As Double = 1 in
Dim oGlobalThickness As Double = Parameter("Unf_Global")

'set all other thickness parameter values to this 'Global' or default
Parameter("Unf_Left") = oGlobalThickness
Parameter("Unf_Top") = oGlobalThickness
Parameter("Unf_Right") = oGlobalThickness
Parameter("Unf_Bottom") = oGlobalThickness
Parameter("Unf_Back") = oGlobalThickness

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes