How to save HyperView visualization preferences?

Mandy Kramer
Mandy Kramer Altair Community Member
edited May 2024 in Community Q&A

I'd like to change the default display options in HyperView. I loaded the .mvw file that was attached to the following article about HyperView model information options (Tutorials, How To, Troubleshooting - How to customize Model Info note in HyperView? (altair.com)).

 

Next, I made three changes in the HyperView session:

  • graphics window background color (with a tcl command)
  • changed the display settings of the model measures (had to load in results to do this)
  • configured the model notes field

 

I then saved a new .mvw file in order to make the updated preferences default using File > Load > Preferences, but I can't find the option to assign the new file as default. Furthermore, when I try to load in the new preferences file in another session of HyperView, none of the settings are changed. I'm sure that there are multiple layers of things I'm doing wrong here, but provided a description of my attempt for a little more context.

 

My question is: how can I save the three listed display settings such that they are loaded by default when a new HyperView session is launched?

 

Thanks,

Mandy

Best Answer

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    Answer ✓

    Hello again Mandy,

    preference file has to be written out of HyperView, and that can be tedious. If HyperWorks(default) remains bold that means the syntax in the preference file you tried to load is incorrect.

    There is an section in online help dedicated to preference file statements:

    https://help.altair.com/hwdesktop/hwx/topics/chapter_heads/preference_file_statements_r.htm

    Again, setting up the preference file is not really guided.

    That said, your 14 clicks should generate hwc commands, which you should be able to leverage in a tcl or Python script (right click in the hwc command widow > Copy to tcl or copy to Python). Then you should get access to a script which you could use to initiate your measure settings.

    Looking at the Plot Style, that could be an unexpected behavior. Coul you please reate a support request so that we can investigate further?

    Best Regards,

    Michael

Answers

  • Hello @Mandy Kramer ,

    once you register your preference file, if you load it and it does not get loaded, that means there are some incorrect syntax in it. Then the point is to determine which lines are incorrect.
    Were you able to fix your mvw file by yourself? IF note, could you please share it?

    Best Regards,

    Michael

  • Mandy Kramer
    Mandy Kramer Altair Community Member

    Hi @Michael Herve_21439 ,

    Thank you for your response. I pulled open a sample model, made some visual changes in the HyperView window, and saved the .mvw file that's attached below. If I register and load this .mvw as a preference file, it doesn't include all of the changes I made to the session. Perhaps this is a session file and not a preference file and I'm generating the preference file incorrectly?

    I also tried a save as function to "report template (*.tpl). I can drag-drop this file into a blank HV window and achieve all of the changes except one (background color change remains default). It seems like the background color change is not something that gets saved into the session file, but I would love to have it in the template. Do you have further guidance for me?

    Thanks,

  • Hello @Mandy Kramer ,

    mvw is the extension that is used for two different mechanisms in HyperView:

    • saving post-processing sessions and reload them as is. If you want to re-use a previous post-processing session on a different set of files, then the flexible report you tried to use is recommended. That said, these files are used to re-load results, not to set preferences
    • saving preferences for HyperView. Here you need a separate preference file with dedicated statements. As an example you can look at the article below, I showed how to create a preference file for changing the default Model Title (pref file is available as attachment):

    https://community.altair.com/discussion/39788/how-to-customize-model-info-note-in-hyperview

    Regarding the background, in the latest version we only propose a theme for HyperWorks environment through the preferences. This theme apply to the ribbons, browsers and graphic area. It is saved in temp files common to HyperMesh and HyperView. Please note that in the latest HyperWorks versions, default theme looks for Windows preference. Eg if you turn on dark mode for Windows, then HyperMesh will be set to dark mode too.

    Last, which modifications would you like to bring to Measures and set as default?

    Hope that helps,

    Best Regards,

    Michael

  • Mandy Kramer
    Mandy Kramer Altair Community Member

    @Michael Herve_21439

    Thank you for your thorough reply.

    A few things I'd like to clear up:

    • I know how to save a session .mvw, but can't figure out how to generate a preference .mvw?
    • it looks to me like the highlighted preference file in the "preferences" window remains the default for new sessions (see image below). Is there a recommended folder location for this preference file, or can it be located anywhere?

    • is there a list or a summary of settings within HyperView that the preferences file controls? The background color issue isn't a big deal, but I prefer the "light" theme with a white graphics background and was hoping that configuration would be a save-able preference.
    • for the measures question, the default static minmax measure settings look like this:

     

    To get it to my desired setup (below), it's a 14-click operation. Is there a way to save these measure settings?

     Lastly, do you know how to apply style to select windows in HyperView? I followed the instructions on the page below (using "synchronize windows" to select two out of my four windows, then "apply style" > "selected window") and the style applies to all four windows instead of two.

    Apply Style

    Thanks!

    -Mandy

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    Answer ✓

    Hello again Mandy,

    preference file has to be written out of HyperView, and that can be tedious. If HyperWorks(default) remains bold that means the syntax in the preference file you tried to load is incorrect.

    There is an section in online help dedicated to preference file statements:

    https://help.altair.com/hwdesktop/hwx/topics/chapter_heads/preference_file_statements_r.htm

    Again, setting up the preference file is not really guided.

    That said, your 14 clicks should generate hwc commands, which you should be able to leverage in a tcl or Python script (right click in the hwc command widow > Copy to tcl or copy to Python). Then you should get access to a script which you could use to initiate your measure settings.

    Looking at the Plot Style, that could be an unexpected behavior. Coul you please reate a support request so that we can investigate further?

    Best Regards,

    Michael

  • Mandy Kramer
    Mandy Kramer Altair Community Member

    Thanks so much @Michael Herve_21439! Appreciate your support.

  • hello again @Mandy Kramer ,

    a colleague of mine just shared some lines you can use in your preference file to change Measure defaults:

    *BeginGraphicDefaults()

    //Measure panel
    MeasureType("Distance Between")
    *MeasureOptions("Magnitude", "Name", "System", "Prefix") // Only options specified are set.
    *MeasureFormat("Fixed") //Fixed or Scientific
    *MeasurePrecision(5) // 0-10
    MeasureAngleFormat("Degrees") //Degrees or Radians

    // Measure font and color
    *MeasureFont("Times New Roman",0,1,12) // Family, bold, italic, size
    *MeasureColor("Black")

    *EndGraphicDefaults()

    Best Regards,

    Michael

  • Mandy Kramer
    Mandy Kramer Altair Community Member

    @Michael Herve_21439 Thanks to you and your colleague for the preference file code, that's immensely helpful! Do you know if the measures box background is edit-able with code or otherwise? I'd like to set something other than the dark blue as my default:

    The "How to Customize Model Info Note in HyperView" article that you linked to has a preference file attached, but I didn't see how you created that .mvw. Is it a templex editing process, or can it be exported from a HyperView session? Sorry if this is a redundant question, but the article makes it sound like you generated a new preference file from HyperView.

    Thanks,

    Mandy