Module tools
This module contains the tools that are available for specific tasks within the VIIA project.
Interactive modelling Tool
MYVIIA Dashboard Tool
The goal of this tool is to fill or update the object database in a faster and more efficient way without the need to open MYVIIA. The page is divided into six main sections:
Home: Where the user retrieves data from MYVIIA and uploads the JSON file.
General Data: Displays general data such as the height of the building.
Base Shear Data: Collects and graphically displays the base shear in the x, y, and vertical directions.
Floors: Contains data related to floors.
Walls: Contains data related to walls.
Roofs: Contains data related to roofs.
A recording on the tutorial of the MYVIIA Dashboard is given below:

Starting the Dashboard
To start the dashboard, run it using the following command:
from viiapackage.tools.myviia_dashboard.myviia_dashboard import myviia_dashboard
myviia_dashboard()
Home
Once the dashboard is running, a web page will open that looks like this:

If you are currently assigned to an object, the object number will appear in the select box. To choose another object, select ‘All objects’ on the right, then click on the arrow in the select box and choose the desired object, or simply type the object number. Once selected, the object part on the right side will be updated, allowing you to choose the specific part you are looking for.
After selecting the correct object number and part, press the ‘Collect info from MYVIIA’ button.
At this point, the data retrieved from MYVIIA will be loaded. The next step is to load the JSON file containing the model data of the A12/A15 analysis (this is the json-file in the folder with the results of the analysis). Press the ‘Browse files’ button on the right, select the file from the correct location, or drag the file onto the box. The data from the file will be read, which may take some time depending on the file size.

When the file is loaded, the following overview should appear:

General Data
The interface consists of multiple boxes arranged in two columns. The first column displays values retrieved from the MYVIIA database, which are non-editable. The second column contains values calculated, where possible, from the JSON file, and these values are editable.
After completing the edits, the data can be sent to the database by pressing the ‘Save and send to MYVIIA’ button. The updated data will then be visible on MYVIIA. This two-column structure is maintained across subsequent pages.

Additionally, if you scroll down, you can see how and for which areas of the building the volume is calculated in the second column using blue voxels.

Base Shear
This page contains a table and two distinct graphs.
The table presents the maximum base shear and vertical force information from the latest recorded A12/A15 analyses, with one entry for each signal that has a record in the MYVIIA database. The greatest absolute value is highlighted for clarity.
The leftmost bar chart displays the base shear in the x and y directions, collected per signal. The rightmost graph visualizes the absolute vertical force.
Additionally, there are two columns. The left column contains non-editable data retrieved from MYVIIA, while the right column contains data retrieved from the engineering database. The latter is editable. By pressing the ‘Save and send to MYVIIA’ button, the values in MYVIIA will be updated to reflect the changes made in the right column.

Floors
The configuration consists of two columns. The rightmost column displays values retrieved from the JSON file, which are editable and can be sent to MYVIIA by pressing the ‘Save and send to MYVIIA’ button. These values can be compared with the current data on MYVIIA, presented in the left column.
Below, a plot illustrating the object is provided.

Future updates will include highlighted floors in the picture above.
Walls
The configuration again consists of two columns for the walls, including all available options.
Additionally, a visualization of the load-bearing walls’ lengths is provided, with a legend on the right side indicating the length of each wall.

Roofs
The configuration again consists of two columns for the roofs, including all available options.
Below, a plot illustrating the object is provided.

Future updates will include highlighted roofs in the picture above.
Summary Page
In a future update, a summary page at the end of the dashboard to recap all the data sent will be added.
Initialisation
Helper functions
- viiapackage.tools.myviia_dashboard.helper_functions.create_3d_plotly_fig(project: ViiaProject, obj_part: str, load_bearing: bool = False, calculate_volume: bool = False)[source]
Function to create the 3D plotly figure of the model with requested info.
- Input:
project (obj): VIIA project object containing collections of fem objects and project variables.
obj_part (str): Name of the object-part in MYVIIA.
load_bearing (bool): Select to create the image for the load-bearing walls. Default value is False.
calculate_volume (bool): Select to create the image for the volume of the model. Default value is False.
- Output:
Returns the 3D plotly Figure object.
- viiapackage.tools.myviia_dashboard.helper_functions.create_overview(project: ViiaProject, container)[source]
Function to create an overview about the project in the sidebar.
- Input:
project (obj): VIIA project object containing collections of fem objects and project variables.
container (obj): Streamlit sidebar container.
- Output:
Overview is created in the sidebar.
- viiapackage.tools.myviia_dashboard.helper_functions.determine_folder_name(signal_name: str) str [source]
Function determines the folder name based on the name of the signal.
- Input:
signal_name (str): The name of the signal to evaluate.
- Output:
Returns the corresponding folder name. Returns ‘A12’ if the signal name ends with ‘v001’, ‘A15’ if it ends with ‘vXXX’ with XXX>1, and ‘Unusual folder name’ otherwise.
- viiapackage.tools.myviia_dashboard.helper_functions.first_non_zero_from_bottom_dict(data: list, keys: List[str]) dict [source]
Function to retrieve the first non-zero value from the bottom of a list of dictionaries for specified keys.
- Input:
data (list): The list of dictionaries containing various attributes.
keys (list): The list of keys to check for non-zero values.
- Output:
Returns s dictionary with the first non-zero values for each specified key.
- viiapackage.tools.myviia_dashboard.helper_functions.get_max_from_specific_columns(df, columns: List[str]) dict [source]
Function to get the maximum value from specific columns in the DataFrame.
- Input:
df (pd.DataFrame): The DataFrame from which to get the maximum values.
columns (list of str): A list of column names to get the maximum values from.
- Output:
Returns dictionary with the maximum values for each specified column.
- viiapackage.tools.myviia_dashboard.helper_functions.highlight_max(s) List[str] [source]
Highlight the maximum value in a Pandas Series.
- PInput:
s (pd.Series): The Pandas Series to evaluate.
- Output:
Returns a list of strings representing the background color for each element in the Series. The maximum value (excluding the first element) will have a background color of yellow.
- viiapackage.tools.myviia_dashboard.helper_functions.initialise(obj_nr: str, obj_part: str)[source]
Function initialise the session by adding info to the session state of streamlit for later use.
- Input:
obj_nr (str): Name of the object.
obj_part (str): In case of multiple parts (separate TVA reports will be delivered), select the correct part for this analysis. On MYVIIA you can see which object parts are available. If the object is not split in separate parts, this input is not required.
- Output:
The streamlit session state is initialised.
- viiapackage.tools.myviia_dashboard.helper_functions.round_values(df)[source]
Function to round numerical values in the DataFrame to the first decimal place and remove any trailing zeros.
- Input:
df (pd.DataFrame): The pandas DataFrame with numerical values to be rounded.
- Output:
Returns the pandas DataFrame with rounded numerical values without trailing zeros.