Created
May 10, 2021 14:19
-
-
Save Omnistic/307ff99564c92d4563533f7514793e4a to your computer and use it in GitHub Desktop.
ZOS-API: Save Footprint Diagram results to a text file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Footprint Diagram analysis | |
FootprintDiagram = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.FootprintSettings) | |
# Check the implementation status of this analysis feature in the ZOSAPI | |
print('Does Wavefront Map have fully-implemented settings?', FootprintDiagram.HasAnalysisSpecificSettings) | |
# This means the settings needs to be accessed through IAS_.ModifySettings (see Example 17 in the ZOSAPI Syntax Help) | |
# Retrieve Footprint Diagram results | |
FootprintDiagramResults = FootprintDiagram.GetResults() | |
# Save results as text file | |
MyFileName = 'FootprintDiagramResults.txt' | |
if FootprintDiagramResults.GetTextFile(TheApplication.SamplesDir + '\\' + MyFileName): | |
print('Text file created successfully') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment