iLogic Form - Change image based on parameter selection

iLogic Form - Change image based on parameter selection

brad.jackson
Enthusiast Enthusiast
1,719 Views
7 Replies
Message 1 of 8

iLogic Form - Change image based on parameter selection

brad.jackson
Enthusiast
Enthusiast

Is there a way to add multiple pictures to an iLogic form and have them change based on the user selection from a multi-value parameter?  In this case, I have (2) images that I would like to change based on the 'PROFILE_TYPE' selection.  No matter what I do, the images will not show up.

I also tried using individual image files (not 'Picture Folder').  That only resulted in both images showing all the time regardless of selection.

 

bradjackson_0-1661523383704.png

 

0 Likes
Accepted solutions (1)
1,720 Views
7 Replies
Replies (7)
Message 2 of 8

WCrihfield
Mentor
Mentor

Hi @brad.jackson.  You really can not do much with an iLogic Form from an iLogic rule, besides showing the form, and getting some very basic feedback about how the form was closed.  If you need the image to change interactively while the form is still open, you may need to create a different type of Form, like the VBA UserForm, or regular Windows Form (through vb.net and others).  With those other type of forms, you have a block of code which dictates much of the aspects of the Form, not just a basic form editor dialog.  However, creating those other types of forms is a lot more complicated if you are not familiar with creating them.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 8

brad.jackson
Enthusiast
Enthusiast
I was afraid of that. Unfortunately, I am not to the point of creating VB forms yet. Thanks anyway. At least I know its not possible with iLogic and I can stop beating my head against the wall.
0 Likes
Message 4 of 8

brad.jackson
Enthusiast
Enthusiast

Just curious.... What does the 'Picture Parameter Name' in the picture setting do?  I can select a parameter, but what should it accomplish by setting that value?

0 Likes
Message 5 of 8

WCrihfield
Mentor
Mentor

My mistake.  This may be possible after all.  I had not messed with multiple pictures in an iLogic Form for a long time. 

You can have an iLogic Form set up with a single picture, then a picture folder with multiple pictures within it.  Then name the pictures within the folder specifically.  Then create a multi-value text type user parameter, which contains the names of the images contained within the picture folder within the form, then include that user parameter in your form.  Then within the properties of the single picture, set that 'Picture Parameter Name' to the user parameter you created.  Now when you change the value of the multi-value user parameter, the single image changes to the image matching the current name of the multi-value parameter.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 6 of 8

WCrihfield
Mentor
Mentor

And I supposed if that scenario is possible, you could have an outside tool like an iLogic rule that could change the value of that parameter indirectly, when something else happens, as needed, and have it effect the form's image, since it is driven by the multi-value parameter's value.  This would work best in a local/internal form though, because then you would have instant updating.  If this was done in a 'global' iLogic Form, you would likely have to make sure the multi-value user parameter exists in whichever document happens to be 'active' at the time, and you would also most likely have to use the Apply button to see changes happen after changing things within the form.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 7 of 8

WCrihfield
Mentor
Mentor
Accepted solution

The set-up:

  • Two multi-value text type user parameters
    • PROFILE_TYPE
      • ROUND
      • RECTANGULAR
    • FormPicture
      • Picture 1
      • Picture 2
  • local/internal iLogic rule
    • If PROFILE_TYPE = "ROUND" Then
      	FormPicture = "Picture 1"
      ElseIf PROFILE_TYPE = "RECTANGULAR" Then
      	FormPicture = "Picture 2"
      End If
  • local/internal iLogic Form
    • WCrihfield_1-1661527231428.png

      The single image has its 'Pictrue Parameter Name' property set to the secondary multi-value user parameter, but I am not including that parameter in the form directly here.  I am allowing the iLogic rule to change that parameter's value automatically when the value of the 'PROFILE_TYPE' multi-value parameter's value changes.

    • It is working as expected.  When I choose 'ROUND' in the 'PROFILE_TYPE', it shows 'Picture 1' image, and when I choose 'RECTANGULAR', it shows 'Picture 2' image.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 8 of 8

brad.jackson
Enthusiast
Enthusiast
Thats perfect!!!!!
0 Likes