Learn the process to build apps that provide real value to your work and that other people will definitely want to use as well.
With VIKTOR, it is possible to create a web app with Python that integrates with any desired software, just like Excel. This web app functions as a single point of truth with a central database that always contains the latest version of a project (with version history) that all stakeholders can access.
We have written open-source code as an example of such a VIKTOR application for the automated calculation of a simply supported beam under load with Excel.
There are two ways in which you can use the functionality:
For a full tutorial on this sample app click here.
This is a snippet of the functionality’s code from the VIKTOR GitHub repository:
1def get_evaluated_spreadsheet(self, params):
2 inputs = [
3 SpreadsheetCalculationInput('L', params['general']['beam']['length']),
4 SpreadsheetCalculationInput('W', params['general']['beam']['width']),
5 SpreadsheetCalculationInput('H', params['general']['beam']['height']),
6 SpreadsheetCalculationInput('E', params['general']['beam']['E']),
7 SpreadsheetCalculationInput('aw', params['general']['beam']['aw']),
8 SpreadsheetCalculationInput('wa', params['general']['beam']['wa']),
9 ]
10 sheet_path = Path(__file__).parent / 'beam_calculation.xls'
11 sheet = SpreadsheetCalculation.from_path(sheet_path, inputs=inputs)
12 result = sheet.evaluate(include_filled_file=True)
13
14 return result
Here you can see it is very easy to send input to your Excel sheet. It is required to have a tab in Excel called ‘viktor-input-sheet'. To get results, you use the evaluate() method. Here, VIKTOR retrieves output from the ‘viktor-output-sheet' Excel tab.
The documentation for the SpreadsheetCalculation
class can be found here
In the video, you can see how a simply supported beam under load is calculated through an integration with a spreadsheet in a VIKTOR application in the demo environment.
Apply for a demo account to get access to this and all other VIKTOR sample applications.
As you can see in the video, the process of automatically calculating a simply supported beam under load consists of 3 steps.
Schematic visualization of a simply supported beam under load.
3D visualization of a simply supported beam under load.
Use the free version or apply for a demo account to try the functionality yourself!