Every time I try and export my scenario to an inp I get the error "Object reference not set to an instance of an object." I downloaded the latest version of watergems today and tried again - same error. It only exports my junctions. Any help would be appreciated.
Assuming there are no user notifications of note created when you are trying to export, it may be useful to see a copy of the model files to look into this further.
Hi Scott, I sent in my model on Monday. Is there a way to confirm that y'all received it? Thanks!
Thank you for uploading the model files, while exporting WaterGEMS model into EPANET format, if you choose No - use element ID's as reference and not use labels then model exports without any error.
The problem is with long labels of pipes, PRVs and patterns, apparently long labels are not supported by EPANET 2.XX.XX version, which can be seen in below screenshot. Once you export the model with option to choose export labels below user notifications are seen.
Workaround is to relabel the pipes, PRVs and pattern names and then export EPANET if you wish to use labels are reference, else you can choose to export IDs instead which would be a quick way.
Bentley Technical Suppport
Hi Sushma, thanks for your reply! Unfortunately I get the same error even when I export IDs.
Could you please confirm what version of WaterGEMS you have now, is it latest? A screenshot of user notifications you receive in WaterGEMS once you export INP file would be helpful.
I tried in both WaterGEMS 10.02.01.06 and latest version, exporting IDs didn't give any error.
Unfortunately we're not able to reproduce this issue with that version, either before or after applying the latest related cumulative patch set. Most likely there is something different between your workflow or computer and ours. Please provide the following information to help troubleshoot:
1) Are you certain that you sent us the correct model file? Maybe try re-sending, this time using the File > Save to Package option (sending us the resulting ZIP file) Please also identify the scenario you have active when exporting.
2) In case one of the supporting files is somehow interfering, please try copying only the .WTG and .WTG.SQLITE files to a new folder on your local hard drive (such as your Desktop or My Documents), re-open it and try exporting again (with the ID option).
3) Try opening WaterGEMS by right clicking on the shortcut and choosing "run as administrator", then try exporting again.
4) Try choosing a different location to save the exported INP file, and choose a simple name to see if it makes a difference. For example "test.inp" on your desktop.
Jesse DringoliTechnical Support Manager, OpenFlows ProductsBentley Communities Site AdministratorBentley Systems, Inc.
1) I am certain but can definitely resend. Scenario - Alternate 2, MDD
2) Tried this, same error. Also sent it over to a coworker, he got the same error when he tried to export.
3) Unfortunately my firm does not let me run it as an administrator.
4) Tried to save it to desktop and named it test.inp...same error.
I told our client I would send them the inp weeks ago...if it does work on yall's end is there a possibility that y'all could send me the inp for the Alternate 2 MDD scenario?
Thanks for your help!
Hi Taylor - the scenario name was the key. In the model you had sent, the active scenario was set to "Existing System" which does not exhibit the problem. When I switch to the one you just mentioned "MDD" within the "EST Rehab- Alternate 2" scenario, I get the same error when trying to export to EPANET.
The problem appears to be due to hydropneumatic tank HT-1, which is present in the scenario in question but inactive in the one you had set current when you sent the model. From my testing, it appears that this happens in any model that has a hydropneumatic tank. I will report this to our development team but in the meantime, you may need to approximate this element as a different element. Hydropneumatic tanks are not an available element type in EPANET itself so some assumptions must be made on export, and equivalent results cannot be expected in EPANET. If you are sending the INP file to someone who does not have WaterGEMS, be sure to mention this limitation and the following related article: What are the limitations of importing/exporting EPANET files?
As a workaround to be able to export the model, try morphing the hydropneumatic tank as a regular tank, and configure the diameter and elevations to be roughly equivalent (see "constant area approximation" mentioned here).
Answer Verified By: Taylor Townes
Fantastic, thank you so much!
Glad to help. To close the loop on this, I have reported the issue to our developers as Defect # 526919, to be resolved in a future release (to better handle this situation instead of the error). I have added a note about this to the related wiki article.