Python Api for Summary Images

Python Api for Summary Images

Anonymous
Not applicable
218 Views
0 Replies
Message 1 of 1

Python Api for Summary Images

Anonymous
Not applicable

Hello Everyone, 

I'm trying to use API to extract Summary Images based on previously saved View Settings. I started with recreating the example in the documentation. That can be found here:

Autodesk CFD 2016 API: summary_image.py

 

But I get the error message:

TypeError: in method 'SummaryImage_Create', argument 1 of type 'script::DecisionCenter *'

 

So there is something wrong with the "study" argument in the creation of the summary image. Everything before that is working fine and the View Setting is loaded in perfectly.  

Does anyone know, what argument I have to use instead?

 

 

My code looks like this:

 

from CFD import Setup

from CFD import DSE

from CFD import DC

 

def main():

    study = Setup.DesignStudy.Create()

    scenario = study.getActiveScenario()

    results = scenario.results()

 

    if results is None:

        DSE.UI.ShowMessage("There are no results!")

        return

    results.activate()

    DSE.UI.LoadViewSettings("C:/Autodesk CFD/Trockensorption/Ansicht_Reaktorebenen.xvs")

    simage = DC.SummaryImage.Create(study, "My Image")

 

main()

 

Thanks in advance and best wishes

Cora

 

0 Likes
219 Views
0 Replies
Replies (0)