Script Samples

Welcome to our "Script Samples" web page! Here, you'll find a treasure trove of script examples that unlock the full potential of Sustainable Building Modeler. These scripts empower you to perform custom calculations, analyses, and generate detailed reports tailored to your unique needs. But that's not all! In addition to the samples found here, we've got you covered with several other handy converter examples, including DXF files, EPANET files, and Modelica files converters, all conveniently available on our GitHub page. Stay tuned for the GitHub link to access these powerful tools and take your sustainable building modeling to the next level! 💡💻📊

Polygon Building

This sample programmatically generates a polygon building.


EPANET Simulation

This script  creates a new EPANET project (or opens an EPANET .inp file from working folder), adds links and nodes from SBM model, runs hydraulic analysis, displays results and saves the final .inp file.


Creating elements with script

This snippet generates an array of cylindrical tanks in a spiral formation.

DXF Drawing

This sample Converts  model elements to a DXF drawing.

Modelica models

This sample converts current project to a Modelica model, using Modelica.Fluid standard library components. 

Generated model might need additional modifications before simulating.

Gas properties table

This script displays a gas properties data vs temperature & pressure, given its material tag. 

Multi-Layer bodies

This script iterates through a multi-layered bode layers and displays each layers info. 

Working with units

This example illustrates how use unit functions. 

Insulation Layers editing

Edit layers, materials and thickness of insulations.

Humid air properties table

This script generates humid air properties tables vs temperature & relative humidity.