Announcements

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

Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Forms need "Equation" Field Access for Parameters

iLogic Forms need "Equation" Field Access for Parameters

I want to be able to type an equation into a Form's parameter field and maintain that equation. As it functions today, everything displays and converts into values when entered through a form. I have no idea if the form is displaying a static value or a value resulting from an equation. 

 

Reason:

The products we make are available in custom sizes so component formulas and calculations that we have built into the parameters are vital to our operations. Right now, using an ilogic form wipes away that valuable information.

 

 

 

 
8 Comments
jtylerbc
Mentor

At best, it's a goofy inconsistency that you can type equations into a parameter directly, but not into an iLogic form that is editing that same parameter.  There is definitely no advantage to the way it works now, so we wouldn't lose anything by implementing this.  Seems like a good idea to me.

robbeRtek
Advocate

We have two parameters instead of one. For example:

--> Length and str_Length (where Length is a double and str_Length is a string)

To display: str_Length = Length.expression

If str_Length changes, it triggers a rule to paste (and convert, etc.) the string value to double --> Length

.

robbeRtek_1-1714642771294.png

The yellow one is read only

 

mat_hijs
Collaborator

I've been a little annoyed about this issue quite often too. Workarounds like @robbeRtek describes are fine when you only have a couple of parameters, but not when you have hundreds of parameters.

Yijiang.Cai
Autodesk
Status changed to: Future Consideration

Many thanks for posting the idea, and tracked as [INVGEN-81507].

 

You could also try the workaround as below -

  • Add a user Text parameter “AAA”, and make the initial value as “FRAMEW - 5 in”, and create the iLogic rule as below.

Dim oDoc As Inventor.PartDocument

oDoc = ThisDoc.Document

 

Dim oDef As Inventor.PartComponentDefinition

oDef = oDoc.ComponentDefinition

 

oDef.Parameters("FOA").Expression=AAA

 

When adding the user parameter “AAA” in the iLogic form, please see the behavior. When input the equation for “AAA”, the FOA will be updated. And the error will show when the invalid equation is provided.

MjDeck
Autodesk

@f_calebh , we can implement this in a future release. For now, in addition to the workaround that @robbeRtek posted, here are two other ways to show equations in forms. These will work in some cases:

 

Method 1


In the Parameters dialog, right-click on the parameter and choose "Make Multi-value". Enter a list of different equations as the list of possible values. These would be alternate equations to drive the parameter. This will work when you only have a fixed set of possibilities. The equations will show up in the form unchanged, and you can choose between them.

Method 2

In some cases, you might be able to avoid editing equations by using intermediate parameters. For instance, you could have a parameter named ScaleFactor (with units of ul). Then instead of editing an equation to change it from "Length * 1.1" to "Length * 1.2", you could just fix the equation at "Length * ScaleFactor" and edit the value of ScaleFactor. This is a very simple example, but it could be extended with more intermediate parameters. And it could be combined with Method 1 to provide more choices.

This requires extra work, but the end result would be a form that is easier to use. You won't have to edit equations.



f_calebh
Advocate

@MjDeck Thanks, a future update would be great. Currently we're creating the formulas during the design process, so we won't ever have pre-defined selections that would work for our use-case. I'm going to look into the method suggested by @Yijiang.Cai . I think that method could work, though it would duplicate the number of User Parameters.

MjDeck
Autodesk

@f_calebh , using the form would be the very last step in the design process, right? A lot of design work is required before adding the form. Our thinking was that the form could be used by an end-user who did not know the details of how the model was put together, and would not know which formulas could be changed and how.
But I guess it would be possible to change some formulas without an in-depth knowledge. And some end-users would know more about how the model was put together.
So I think we can add formula display as a new option in a form in a future version. It would be an option on each form, and it would apply to all controls in that form.

 

There's another option which I'll mention as:

Method 3

Don't use an iLogic form. Instead, just use the Parameters dialog in Less mode. That's available on the Less button in the lower right-hand corner. That will show only the parameter names and equations. That gives you a rough preview of how a form would look (for parameters) when we implement the new "Show Equations" option.

f_calebh
Advocate

@MjDeck Thanks for the suggestions. For my specific use case we use common parameter names across designs, and we want to keep them consistent. Not all of our existing files have these common parameter names added to them. My specific form displays approved parameter names and if a set of parameters is missing, the user can add them with iLogic code. I want this to be their user parameter "Cheat Sheet" for consistent parameter naming on non-templated files and ideally for editing as well. I'm not currently using the form, just the code to add the parameters if needed.  

If I went live with this, I'd probably have multiple tabs with product specific parameters as well.

f_calebh_1-1730405981016.png

 

 

 

 

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

Submit Idea  

Autodesk Design & Make Report