We use Maxsurf a lot throughout the company for various design aspects. But in the end we do produce standard reports (e.g. stability booklets). To make some steps in improving the efficiency of generating these reports, first thing to do is to standardise the output setting of Maxsurf analyses through Display | Data Format for each of the result tables in the Results window. That's a lot of error-prone work though, as you need to manually cycle through all analysis types and set the Data Format options (which are a lot sometimes) manually.
So I am looking for a way to script the Display | Data Format settings for all analysis types with VBA or Python. I wonder if this is possible, since I don't find a clear hint on what objects and methods to use to adjust these settings in the Automation help file. Is this configuration perhaps set in some hidden txt file, or is there some other undisclosed way of automating this configuration from an external application?
Ideas, suggestions and guidance is much appreciated!
hi Ard, there isnt a way to set the columns via the automation interface. Its a feature I realise is missing but have not figured out a good way of implementing - because setting via the COM automation is probably not the most user-friendly. I had been thinking of adding it to the report template, but maybe jus having it in a report settings file which can be saved, loaded and shared would be simplest?
For the moment there is a workaround via the windows registry, be very careful that you dont break anything in other parts of the registry! With MAXSURF you can reset all the registry flags if you launch with the Shift-button held down, you then get a dialog pop up asking if you want to clear preferences.
SO in the registry you can change the table layouts, and you could save those settings as a registry file and load them in before you launch Stability to set up the tables as required for reporting. The settings are here: Computer\HKEY_CURRENT_USER\Software\Bentley\MAXSURFStability23\SettingsLook for ones with Settings\TableDisplay\You will see 3-entries per column: ending in 'COlWi' , 'Graph' and 'Table' - the first is the column width, the second and third determine if the dataset is displayed on the graph or in the table. You have them for all the different results tables which use the data format dialog to select these data in the GUI:
Some of the tables use the more general way the column settings are stored in the registry - set the column width to zero to hide the column - unfortunately the names are less obvious:
For the input window like the loadcase - set the column width to zero to hide the column - unfortunately the names are less obvious:
Ill think some more about how best to implement a more user-friendly method of doing this, if you have suggestions, please let me know.
Thanks for your quick answer, that helps a lot. Indeed, editing the registry does the trick and makes it possible to manipulate a lot settings too. As you suggest, an editable configuration file would be preferred from our point of view as it eliminates the risk of screwing up the registry and would provide all the adaptability we need.
As I imagine this feature wouldn't become available any time soon, if you would happen to have a reference list of Computer\HKEY_CURRENT_USER\Software\Bentley\MAXSURFStability22\Settings registry items and their possible values which could be shared, that would be a very great help.
Many thanks for your support!
I dont have a list as such its in the 1M+ lines of code. The ones I indicated before are the main ones that are of interest for controlling the column/row visibility.
I would suggest that maybe the best approach is to setup everything as you wish as per your requirements for reporting - do this is the user interface. Close Stability (that saves the preferences when the application shuts down). The open the registry editor (or refresh it) and Export the Stability folder tree from the Reg editor. That way you will get the required settings without having to edit the settings manually.
Thanks for the suggestion, that confirms my hunch!
I have been looking into a file format suitable for saving and restoring the table setup rather than having to manipulate the registry. JSON looks quite promising - if you can tell me your email address (mine is email@example.com) I can email you a sample to see what it might look like. thanks, Pat