Skip to content

Instantly share code, notes, and snippets.

View lbutler's full-sized avatar

Luke Butler lbutler

View GitHub Profile
@lbutler
lbutler / createdisconnection.c
Created July 2, 2023 13:21
Create an INP with 150,000 disconnections in EPANET
#include <stdio.h>
#include "lib/2.2/epanet2_2.h"
int main() {
int errcode;
int index;
EN_Project ph;
@lbutler
lbutler / import_model.rb
Last active January 9, 2020 20:53
Infoworks Ruby Script - Using Ruby with the open data import centre
require 'FileUtils'
open_net = WSApplication.current_network
# Prompt user for a folder
shp_dir = WSApplication.folder_dialog 'Select a folder to import files', true
# We keep our CFG files with the Ruby script
cfg_dir = File.dirname(WSApplication.script_file)