I wrote this AutoCAD script to streamline the process of defining and drawing subcatchments in EPA-SWMM. The script will prompt you to select any number of polylines in AutoCAD, and will automatically create a file in the location you specify. The script creates an EPA-SWMM input file that contains the catchment area and vertexes so that the catchment can be drawn in EPA-SWMM.
To run the script, open AutoCAD, and type the command “vbaload”. Browse to the location where you saved the file, select it, and hit ok. Make sure you “enable macros” when you’re prompted. Next type “vbarun” and select the macro ending in “Export2EPASWMM”.
Make sure you’ve entered an existing directory, and specify the filename, ending in .inp. Note that the containing directory needs to exist, but not the file. Any existing file by the same name will be overwritten. Once the filename has been specified, click on “Select Polylines” and follow the command prompts. Once complete, you can open the input file (by the name you specified) in EPA-SWMM.
This is a free download – you may use it as much as you like, but it comes without warranty. The script is password protected, but if you’d like to see/edit the code, tell me why and I’ll probably be willing to send you an unprotected version.