Cancel
Showing results for 
Search instead for 
Did you mean: 

FEMAP API: Going thru SUBCASES

Creator
Creator

Hi guys, 

 

Im still noobie with FEMAP API and need help...

I'm trying to create a script that needs to go thru every subcase (analysis results) of simulation. Number of subcases is different in each file so I need to somehow count them and activate for each model.

 

Can you direct me to proper keywords that I should use? I searched a little  and I think I should use:
App.feAnalysisStudy.CountOutputSets 

Im having trouble with this function. Do you maybe have some example how to use it?

 

Thanks

1 REPLY

Re: FEMAP API: Going thru SUBCASES

Siemens Phenom Siemens Phenom
Siemens Phenom

Try the example script below.

 

Sub Main
    Dim App As femap.model
    Set App = feFemap()

        'Signed 64-bit (8 byte) Integer
    Dim numb As Long

    'Dim AMngr As femap.AnalysisMgr
    'Set AMngr = App.feAnalysisMgr

        'Create Analysis Study Object
    Dim AStudy As femap.AnalysisStudy
    Set AStudy = App.feAnalysisStudy

        'Loop through all Analysis Studies and Print Number of Results Sets in Each
    While AStudy.Next()
            'Activate each Analysis Study as you loop through
        AStudy.Active = AStudy.ID

        numb = AStudy.CountOutputSets()
        Msg = "Analysis Study: "+Str$(AStudy.ID )+", has "+Str$(numb)+" Results Sets"

        App.feAppMessage(FCM_NORMAL,Msg)
    Wend
    
End Sub

 

CountOutputSets().png