Hide units visibility in iLogic Form

Hide units visibility in iLogic Form

Anonymous
Not applicable
1,469 Views
8 Replies
Message 1 of 9

Hide units visibility in iLogic Form

Anonymous
Not applicable

Hi,

 

I have an application where user should not see units in ilogic form.Is it possible to hide?

 

Can anyone help on this

 

 

0 Likes
Accepted solutions (1)
1,470 Views
8 Replies
Replies (8)
Message 2 of 9

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @Anonymous,

 

From what I recall, the way I've had to do this in the past is to create a user TEXT parameter and use that in the form, and then in the iLogic code, hand the value from the TEXT parameter to the numeric parameter.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 3 of 9

Anonymous
Not applicable

Thank You Curtis.It worked.

0 Likes
Message 4 of 9

johnsonshiue
Community Manager
Community Manager

Hi Axel,

 

It does literally work just like what Curtis described. Let's say you have a numerical parameter call "LENGTH" and its value equals 1200mm. You can create a text parameter called "LENGTH_TXT" and set its value to "" or anystring.

In the iLogic rule, simply write "LENGTH_TXT = LENGTH." Then LENGTH_TXT's value will become 1200 without the unit.

On the Form, simply show "LENGTH_TXT" instead.

You do want to keep the two parameters in sync at all time.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 5 of 9

Anonymous
Not applicable

Hi,

 

Good! you're right the units were eventually hidden. However the matter now is that I cannot change the value when I try to write a different one from (i.e.) 1200, it does not change, it stays at 1200. Then I check the user parameter text on the parameters window and its value is actually 1200 (instead of "") but does not modify neither in the parameters window nor the form. I most provably overlooked something. I followed your steps: create a txt param, create a rule (txt param = model param), and use the txt one within the form. It make sense, when you change the txt one it'll change the model one at the end. But as I said it does not change for some reason. BTW, another thing I did not get was keeping values sync, what did you mean exactly with this? (perhaps this is my mistake?)

0 Likes
Message 6 of 9

johnsonshiue
Community Manager
Community Manager

Hi! Please share your files here. It should be doable. I suspect the rule was not structured properly.

Many thanks!



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

Anonymous
Not applicable

Hi,

 

Sorry for my late answer. The file is attached. As I said it works (no units shown) but I can't change the value on the form, most probably because of the rule as you commented. I'm sure it'll be something stupid.

 

Thanks in advance.

0 Likes
Message 8 of 9

johnsonshiue
Community Manager
Community Manager

Hi! The rule is correct but there is no trigger. Go to Manage -> iLogic -> Event Triggers -> add "HideUnits" to "Any Model Parameter Change" or "Part Geometry Change."

It should work.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 9 of 9

Anonymous
Not applicable

Hi,

 

It worked eventually! Told you that it was something stupid: it worked just interchanging the equality params within the rule ("model=TXT" instead of "TXT=model"). BTW, I did not eventually need any event trigger.

 

Thanks a lot for your help after all!