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.
If you find this script helpful or if you have suggestions for improvement, tell me about it in the comments.
2 | AN
September 19th, 2008 at 2:52 am
export2 epaswmm can’t export conduit in file autocad to epaswmm? if it can ! you are can help me ,please!
3 | Skylar
September 19th, 2008 at 6:17 am
AN: No, the program only deals with subcatchments at the moment. I might be able to write a quick addition for a conduit if you can give me some information:
How have you drawn the conduit in autocad? is it a straight polyline, a closed polyline, a civil 3d object, etc?
Please reply via email. Thanks.
4 | an
September 20th, 2008 at 10:21 am
I want a program . it can Export file .*dxf to file.*inp for epaswmm same “Dxf2epa.exe” program , it can export file .*dxf in autocad program to .*inp for “Epanet 2.0 ” program.
thank you very much !
5 | Skylar
September 20th, 2008 at 10:27 am
I’m sorry. To be honest, the program you are requesting is an impossibility. At some point along the line, there will need to be human input. The program I wrote is a small tool to assist in drawing subcatchments only. It does not provide any of the variables required to properly run the epa-swmm model, nor can an autocad drawing even provide that type of information. I recommend you read the epa-swmm documentation here.