Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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: 

Change form label

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Paul.Hardwick1
921 Views, 4 Replies

Change form label

Please can someone help with (hopefully) a snippet of code that will allow me to change the LABEL of a control on a form?

 

I have a check box that has a title (here as 'Slots on the LH Edge'.  Under some circumstances, I need to change the title to read 'Slots on the RH Edge".

 

PaulHardwick1_1-1628505253393.png

 

PaulHardwick1_0-1628505159238.png

 

I can't seem to find anything elsewhere, so I'd appreciate anybody's suggestion.

 

Thank you.

 

4 REPLIES 4
Message 2 of 5
bhavik4244
in reply to: Paul.Hardwick1

@Paul.Hardwick1 

 

As long as I have experienced, it's not possible. However, I would also really appreciate if someone has solution to this.

 

Else, it's good to show both option and user will tick-on whichever applicable.


Bhavik Suthar
Message 3 of 5
WCrihfield
in reply to: Paul.Hardwick1

Hi @Paul.Hardwick1. Unfortunately, even though iLogic forms are fairly easy to create & use, there is still very, very little you can do from an iLogic rule, to access or edit an iLogic Form. About all you can do from an iLogic rule, related to iLogic forms is show one, list their names, and set one setting about size & position saving. There are other types of Forms (VBA UserForm, Windows Form) that are more dynamic and changeable from code, but those other options are also a lot more complicated to use, if you're not familiar with them.


There are also some differences in form functionality between a 'local' (saved in a document) iLogic form and a global iLogic form. Local forms can immediately react to local changes, and can cause immediate reactions locally. There is one little trick you may be able to use, if it is a local form, that may allow you to use two similar checkbox items in your form, with two different labels, then only have one of them available, depending on another parameter's value. In your posted image, while you have that parameter line item selected (representing the checkbox), you can see its properties & settings in the area below. You'll notice under 'Behavior' is one called 'Enabling Parameter Name'. If you set-up another (one or two) True/False type user parameter that is True when you need the "RH" version, and is False when you need the "LH" version, you could use this other parameter within that 'Enabling Parameter Name' control, to dictate when this line item will be available, or greyed out. If set-up right, you would then have two line items (checkbox) for the same parameter, but both have different labels, and only one will be available to the form's user when it is launched, based on those other parameter's values.


If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) ‌👍‌.

If you want and have time, I would appreciate your Vote(s) for My IDEAS ‌:light_bulb:‌or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 5
A.Acheson
in reply to: Paul.Hardwick1

@bhavik4244  Is correct in saying you cannot remove the parameter. You can disable the appearance (grey out) so it is not clickable. Type a Boolean parameter (true/false) call it say SlotsLHControl and another called SlotsRHControl into the parameters. Then in the form click on the parameter title Slots on the left hand edge, then scroll down and under behaviour>enable parameter choose SlotsLHControl. Do the opposite for parameter title Slots on the left hand edge. You can check it functions manually my changing true and false. Then code the logic to control the Boolean parameter into the rule using if statements. 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 5 of 5

Thank you all for your help and detailed explanations.  It's very appreciated.

 

I had considered using multiple check boxes by enabling or disabling them, but it just seemed strange to have to use two check boxes to achieve the same same thing, just because its description changed ever so slightly.  I tend to try and make my forms as user-friendly as I can, keeping them as clean as possible, and while I have used disabled controls, I try to keep them to a minimum.  In this case, I think I'll try to come up with a description that works for both cases.  I'll have to do something.  My OCD won't let me leave it. 😉

 

Thanks again.

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

Post to forums  

Autodesk Design & Make Report