You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a single field report in Maxwell3D using the same calculator expression on multiple polylines (geometry context) but none of my approaches work. Can anybody comment on what I am missing?
Thanks!
# ...
# m3d = Maxwell3D(...) # I'm using 24R2
# any design with an expression "B_rad" that can be calculated on a polyline should work to use this script
polylines = [
"SampleLine_01",
"SampleLine_02",
"SampleLine_03",
"SampleLine_04"] #polyline names in the design
# Option 1
# doesn't work as intended
report1 = m3d.post.create_report(
plot_name="B_rad for all polylines - option 1",
report_category="Fields",
expressions=["B_rad"]*len(polylines),
context=polylines # -> doesn't work cause it expects a string
# context=polylines[0] # -> this would add 4x B_rad plots for the [0] context
)
# Option 2
# doesn't work. Adds traces from Design Category (e.g. Volume(object)) instead
report = m3d.post.create_report(
plot_name="B_rad for all polylines - option 2",
report_category="Fields"
)
for line in polylines:
report.polyline = line
report.add_trace_to_report(
traces=["B_rad"],
context=[line]
)
# Option 3
# Works, creating many plots which is not intended
for line in polylines:
report3 = m3d.post.create_report(
plot_name="B_rad for all polylines option 3",
report_category="Fields",
expressions=["B_rad"],
context=line
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I am trying to create a single field report in Maxwell3D using the same calculator expression on multiple polylines (geometry context) but none of my approaches work. Can anybody comment on what I am missing?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions