Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Visualization report is incorrect #5436

Closed
SMoraisAnsys opened this issue Nov 15, 2024 · 1 comment
Closed

DOC: Visualization report is incorrect #5436

SMoraisAnsys opened this issue Nov 15, 2024 · 1 comment
Assignees

Comments

@SMoraisAnsys
Copy link
Collaborator

Currently the documentation on visualization report as an error. The following code is not working:

    from ansys.aedt.core import Hfss
    from ansys.aedt.core.visualization.report.field import Fields

    app = Hfss(specified_version="2024.2",
               non_graphical=False,
               new_desktop_session=False
               )
    test_points = [["0mm", "0mm", "0mm"], ["100mm", "20mm", "0mm"],
                   ["71mm", "71mm", "0mm"], ["0mm", "100mm", "0mm"]]
    p1 = app.modeler.create_polyline(test_points)
    setup = app.create_setup()

    report = Fields(app=app, report_category="Fields",
                    setup_name=setup.name + " : LastAdaptive",
                    expressions="Mag_E")
    report.polyline = p1.name
    report.create()

After looking into it the solution can be to simply change app=app.post or to manually create the post app, e.g.

from ansys.aedt.core.visualization.post import post_processor
post_app = post_processor(app)
report = Fields(app=app, report_category="Fields",
               setup_name=setup.name + " : LastAdaptive",
               expressions="Mag_E")

Since the first approach seems more elegant, I'll propose the associated changes.

@SMoraisAnsys SMoraisAnsys self-assigned this Nov 15, 2024
@SMoraisAnsys
Copy link
Collaborator Author

Fixed in #5437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant