I'm building a frame layout with a custom part family form and a PDF viewer as second step on the Custom UI Designer. I actually use the PDF viewer to load a htm file. The PDF file is displayed "from property". My goal is to be able to switch from a PDF file to another acting just on the second step, in the custom part family form where the property linked to the PDF viewer can be changed by user.
The property is beeing refreshed when changed by user, but the HTM won't refresh unless I move to previous step and then back to this step (re-loading).
Thanks in advance to anyone that could help me
I believe you need to trigger the call to refresh the model views in the 'When Changed' formula of the property that is tied to the custom form..here's how the formula could look like:
If Value IsNot Nothing AndAlso Value <> OldValue Then
I think it should work..
This is indeed what I meant but I also notice that your property formula is just simply Result = ""...the WhenChanged formula is triggered when the value of the formula changes.
I have a feeling I might've misunderstood the original issue. If you could re-phrase it, it would help.
Correct, the original formula was actually an empty string, now I moved to a default value in case nothing is selected (an empty HTM file). The Result of this property is updated by the "when changed" of another property, so the given result is just to initialize the property.
Even if the property updates correctly, when I am on the proper step and update the value of the property the Frame with the HTM file doesn't refresh. The only way I've found to have it refreshed is to move to another step and then back to this step, forcing the frame to be reloaded. I've coded this work-around in the when changed formula but it doesn't satisfy me much, because you can notice both frames (I have two ones in the same step) beeing re-loaded. Just reloading the frame and not the entire step would be a bit more nice, but I don't know how to do it.
I understand now why you have the formula as empty...in that case, the place where you assign a value (WhenChanged of another property) should also be the place that you can issue a RefreshModelView call. The RefreshModelView call will only work if the viewer refreshes when you do 'F5' or select the 'Refresh' in the menu bar. If that 'Refresh' doesn't do it then RefreshModelView call will also not do it and unforunately, the only way you are left with is what you are doing now.