[RAMSS/RAMDA] Is it possible to get member forces?

I would like to get member column/beam forces using RAMDataAccess.

The force that I'm referring to can be obtained from following: RAM Manager > RAM Concrete > Process > Results > Member Forces.

From here, I can select load cases and forces ie. axial, shear, moment, or torsion.

As I'm fairly new to RAMDA, I think I have to get unique ID for each column first and tell RAMDA what I want from there. Is it possible to get these loads? If so, how? I don't need to actual code, some guides would be appreciated. Thank you!

Parents
  • Hi, 

    There is a lot going on with Process - Results - Member Forces. It is breaking the results into sub load cases and giving answers at specific points along a member. It's pretty complex. Try what I am describing here to see if it gives you the answers you are looking for. This is a simpler approach. If you need additional forces, let me know.

    You will use the IForces2 interface and use the GetMemberForces method. It's easiest to show you with some code. This is C++ but it will be the same logic from whatever language you are using.

    // Get the list load case ids
    IForces2Ptr pIForces2 = m_pDA->GetInterfacePointerByEnum(IForces2_INT); // get the IForces2 interface
    long lNumCases = 0;
    m_pForces2->GetNumAnalysisCases(RAMConcreteResultType, &lNumCases);


    if (lNumCases > 0)
    {
         long* plLCaIDs = (long*) CoTaskMemAlloc(lNumCases * sizeof(long));
         m_pForces2->GetAnalysisCasesIDArray(RAMConcreteResultType, plLCaIDs);

         IModelPtr pIModel = m_pDA->GetInterfacePointerByEnum(IModel_INT); // get the IModel interface
         IStoriesPtr pIStories = pIModel->GetStories(); // use the IModel interface to get the Stories interface
         long lStories = pIStories->GetCount(); // get the number of stories

         // loop through the stories
         for (long lStory = 0; lStory < lStories; lStory++)
         {
              IStoryPtr pIStory = pIStories->GetAt(lStory);
              IColumnsPtr pIColumns = pIStory->GetColumns();
              long lNumColumns = pIColumns->GetCount();

              // loop through each member type (columns are shown here)
              for (long lCol = 0; lCol < lNumColumns; lCol++)
             {
                  IColumnPtr pThisColumn = pIColumns->GetAt(lCol);
                  long lColUniqueID = pThisColumn->lUID;

                 // for each member, loop through the load case ids to get the forces
                for (long lCase = 0; lCase < lNumCases; lCase++)
                {
                     long loadCaseID = *(plLCaIDs + lCase);
                     SForce sMemForces;
                     long lResult = pIForces2->GetMemberForces(lColUniqueID, eStart, loadCaseID, RAMConcreteResultType, 1, &sMemForces);

                     // do something with the forces here (save, print...)
                 }
            }

         }
    CoTaskMemFree(plLCaIDs);
    }

    }

    Answer Verified By: snipit 

Reply
  • Hi, 

    There is a lot going on with Process - Results - Member Forces. It is breaking the results into sub load cases and giving answers at specific points along a member. It's pretty complex. Try what I am describing here to see if it gives you the answers you are looking for. This is a simpler approach. If you need additional forces, let me know.

    You will use the IForces2 interface and use the GetMemberForces method. It's easiest to show you with some code. This is C++ but it will be the same logic from whatever language you are using.

    // Get the list load case ids
    IForces2Ptr pIForces2 = m_pDA->GetInterfacePointerByEnum(IForces2_INT); // get the IForces2 interface
    long lNumCases = 0;
    m_pForces2->GetNumAnalysisCases(RAMConcreteResultType, &lNumCases);


    if (lNumCases > 0)
    {
         long* plLCaIDs = (long*) CoTaskMemAlloc(lNumCases * sizeof(long));
         m_pForces2->GetAnalysisCasesIDArray(RAMConcreteResultType, plLCaIDs);

         IModelPtr pIModel = m_pDA->GetInterfacePointerByEnum(IModel_INT); // get the IModel interface
         IStoriesPtr pIStories = pIModel->GetStories(); // use the IModel interface to get the Stories interface
         long lStories = pIStories->GetCount(); // get the number of stories

         // loop through the stories
         for (long lStory = 0; lStory < lStories; lStory++)
         {
              IStoryPtr pIStory = pIStories->GetAt(lStory);
              IColumnsPtr pIColumns = pIStory->GetColumns();
              long lNumColumns = pIColumns->GetCount();

              // loop through each member type (columns are shown here)
              for (long lCol = 0; lCol < lNumColumns; lCol++)
             {
                  IColumnPtr pThisColumn = pIColumns->GetAt(lCol);
                  long lColUniqueID = pThisColumn->lUID;

                 // for each member, loop through the load case ids to get the forces
                for (long lCase = 0; lCase < lNumCases; lCase++)
                {
                     long loadCaseID = *(plLCaIDs + lCase);
                     SForce sMemForces;
                     long lResult = pIForces2->GetMemberForces(lColUniqueID, eStart, loadCaseID, RAMConcreteResultType, 1, &sMemForces);

                     // do something with the forces here (save, print...)
                 }
            }

         }
    CoTaskMemFree(plLCaIDs);
    }

    }

    Answer Verified By: snipit 

Children
No Data