Python Api for Summary Images

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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