diff --git a/Applications/Utils/SWMMConverter/SWMMConverter.cpp b/Applications/Utils/SWMMConverter/SWMMConverter.cpp index 57a6017499e7539897e5362c0a87ac0946759048..8515288a88038d3e06ca079a07dc612e506e3375 100644 --- a/Applications/Utils/SWMMConverter/SWMMConverter.cpp +++ b/Applications/Utils/SWMMConverter/SWMMConverter.cpp @@ -111,6 +111,18 @@ int writeCsvOutput(std::string input_file, std::string output_file, if (swmm == nullptr) return -1; + if (!swmm->existsSwmmOutputFile()) + { + INFO("No output file found, skipping data conversion to CSV."); + return -1; + } + + if (!(node_args || link_args || catchment_args || system_args)) + { + INFO("No data category selected. Nothing to write."); + return 0; + } + std::string const basename = BaseLib::dropFileExtension(output_file); std::string const extension = std::string("." + BaseLib::getFileExtension(output_file));