Skip to Main Content
Need Support? Let’s guide you to the right answer or agent.
Status Shipped
Workspace STAAD.Pro
Created by Guest
Created on Oct 28, 2023

Create an OpenSTAAD method that can do pictures

I was really hoping that OpenSTAAD had a method that would be able to take pictures of my model for me. I can't seem to find anything that suggest this is possible. We create reports that are being submitted, and generally we snap pictures of the primary load cases to illustrate how the model is loaded, as that easier to understand than a table. The problem is that there are sometimes dozens on pictures and doing it manually takes a long time. Seems like the perfect job for OpenSTAAD.

In order to do this, I'd need functionality that would change the view window location/angle and zoom, activate a load case, turn on loading diagrams and load annotations, take pictures, and than a delete option that would delete existing picture in case I need to retake pictures. It would also be nice to do this with some results, such as the unity or reaction views.

  • Admin
    Carlos Aguera
    Reply
    |
    Nov 11, 2024

    In case you havent spotted, in the release of STAAD.Pro 2024, a number of additional OpenSTAAD functions were added which give users the ability to control the graphical views with the function nReturn = OSTD.View.SetViewWindowPosition(Xtop, Ytop, Xwindow, Ywindow). There were additional controls provided for setting the scales on diagrams, functions to export the view to a file and copy the view to the clipboard. That should provide the functionality as suggested.

  • Admin
    Carlos Aguera
    Reply
    |
    Oct 30, 2023

    Ok, it is certainly a sensible objective to manage Pictures with OpenSTAAD and will add that to the backlog.

    Note tht the tool provided to copy pictures to the clipboard can be found in the Utilities ribbon:-

  • Guest
    Reply
    |
    Oct 30, 2023

    Thank you for the direction on some of this.

    For the zoom. I am mostly looking to zoom in, as some of our models are large and including the entire model makes some of the details hard to see. So naming a node to zoom into would be a good option, either a node number or maybe an option for a point in space. A point in space might be nice because than I could move the view at a certain window size at a set increments. Not sure exactly how it would work, but centering the view around the zoomed in view would be ideal.

    When I said load annotations, I want more than just the load arrows, I am looking to be able to turn on the text that describes the value for the load arrow in whatever units the file is set to. I think I just found that actually I think it is SetLabel(8,true)

    Taking pictures would be to add them to the photo album to use in the report. Does STAAD even have a photo tool that copies the picture to the clipboard? I imagine that if I wanted to use the clipboard, I could a different API, although I haven't tired that.

    Deleting pictures would be deleting them out of the album. It would be nice to be able to delete all at once, or specifically delete them by some sort of picture ID, either by name or number.

  • Admin
    Carlos Aguera
    Reply
    |
    Oct 30, 2023

    Thank you for posting this idea. So to be clear, your idea is to extend OpenSTAAD with functions that:-

    1) Manipulate the view by rotating the structure or setting specific view points like top, front, right, etc. These functions exist, please see the OpenSTAAD documentation View functions., e.g. void OSViewUI::ShowFront()

    2) A function to set a zoom factor for the window. However, that would also require a point at which the zoom is centred. Were you thinking of naming a node point or had some other idea on how that might be defined? Note the functions exist to zoom out, but not in.

    3) Set an active load case. This exists already, refer to the OpenSTAAD documentation and search for:- VARIANT OSLoadUI::SetLoadActive (const VARIANT FAR & varLoadNo)

    4) Turn on loading diagram. That is available, see the OpenSTAAD documentation void OSViewUI::SetDiagramMode(const VARIANT FAR & which, const VARIANT FAR & showFlag, const VARIANT FAR & refreshFlag ) for which the value for 'which' of 0 is DiagramType Load

    5) Load Annotations? Please explain your thoughts as to how this might work.

    6) Take Picture. Do you mean add it to the photo album for creating a User Report in STAAD.Pro or copying the picture to the clipboard so it can be pasted into a third party application such as Word or Excel?

    7) Delete picture. Do you mean a function to remove pictures from the photo album or remove them from the clipboard?

    8) Display results. As above see the function SetDiagramMode.