This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reading Transient Results Viewer From WO.NET

Hello,

As part of a research I'm developing right now, I need to obtain from HAMMER the Pressure Series in all nodes of a network under a valve closure scenario. This results are available in HAMMER in the Transient Results Viewer but I'm not really sure how to access this from WO.NET. I have the reference "Haestad.HAMMER.TransientResultsViewer" installed but I'm not really sure how to use it.

I hope someone has worked with this before or know how to help me with some guidance. Thanks in advance.

Parents
  • Jessica,

    Let me find little more on this fist. The result information that you are looking for, is that visible in the property grid or do you have to have the Transient Result Viewer open in HAMMER software?

    Thanks,

    Akshaya



  • Akshaya,

    I need to enter to the Transient Result Viewer in the tab "Time Histories" and get the time history of a pipe (with Graph Type: Pressure). Then in the tab "data" I got to the results that I need.

    Thanks,

    Jessica

  • Hi Jessica,

    A quick suggestion would be to build the code, copy the contents of the output folder to your HAMMER installation folder, then run the exe from there. Consider making a backup copy of the installation folder first.

    If this does not help, we may need to see your source code.


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

  • Hi Jesse,

    I tried to copy my whole project to the HAMMER folder but the errors I described in my previous posts still appears. In order for you to see my source code, what should I do? I can't attach files here, do I have to the send my code to some email?

    Thanks in advance for all your interest in solving all these issues I'm facing right now.

  • Hi Jesse,

    I just uploaded the file following the instructions of the link you sent to me yesterday. I uploaded two files: a .zip file with my source code (called "ProgramaTesis_V01 - Bentley") and a ReadMe file explaining a little bit what I'm facing.

    Let now If you receive the file and If there is anything else I can do. Thanks in advance.

    Jessica B.

  • Thanks for sending the files. We received them and will take a look shortly.


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

  • Jessica,

    Here are some recommendations based on a review of the source code:

    1. Consider simplifying the approach.  Don’t try to create an application (i.e. custom ApplicationModel, ParentFormModel, ParentForm, etc. classes)

    2. Create a utility class that creates the instances of the Toronto classes (i.e. TorontoApplicationModel and TorontoParentFormModel should be sufficient).

    3. Using the utility class you can open up the .WTG file.

    4. With the TorontoParentFormModel instance you can cast the CurrentProject to TorontoProject in order to setup the classes needed to get to the transient results (summarized in another email).

    5. There is a compute method on the TorontoParentFormModel that takes a scenario ID (or not).  If no id is provided it assumes the active scenario should be computed.  

    6. Using the Compute method in the TorontoParentFormModel will configure the licensing automatically.  If there is a license available then the computation should work.  There would be a user notification if there is no license available.


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

Reply
  • Jessica,

    Here are some recommendations based on a review of the source code:

    1. Consider simplifying the approach.  Don’t try to create an application (i.e. custom ApplicationModel, ParentFormModel, ParentForm, etc. classes)

    2. Create a utility class that creates the instances of the Toronto classes (i.e. TorontoApplicationModel and TorontoParentFormModel should be sufficient).

    3. Using the utility class you can open up the .WTG file.

    4. With the TorontoParentFormModel instance you can cast the CurrentProject to TorontoProject in order to setup the classes needed to get to the transient results (summarized in another email).

    5. There is a compute method on the TorontoParentFormModel that takes a scenario ID (or not).  If no id is provided it assumes the active scenario should be computed.  

    6. Using the Compute method in the TorontoParentFormModel will configure the licensing automatically.  If there is a license available then the computation should work.  There would be a user notification if there is no license available.


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

Children
No Data