-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatch_set_prop_force_report.java
More file actions
66 lines (45 loc) · 1.85 KB
/
batch_set_prop_force_report.java
File metadata and controls
66 lines (45 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Simcenter STAR-CCM+ macro: batch_set_prop_force_report.java
// Written by Simcenter STAR-CCM+ 17.04.008
package macro;
import java.util.*;
import star.common.*;
import star.base.neo.*;
import star.base.report.*;
import star.vis.*;
public class batch_set_prop_force_report extends StarMacro {
public void execute() {
execute0();
}
private void execute0() {
Simulation simulation_0 =
getActiveSimulation();
// get initial reference section report
LineIntegralReport lineIntegralReport_0 =
((LineIntegralReport) simulation_0.getReportManager().getReport("0.25FZ"));
LineIntegralReport lineIntegralReport_1 =
((LineIntegralReport) simulation_0.getReportManager().getReport("0.25FX"));
// copy and set reports
for (double prop = 0.26; prop < 1.0; prop += 0.01){
String prop_str = String.format("%.2f", prop);
// get section
PlaneSection planeSection_1 =
((PlaneSection) simulation_0.getPartManager().getObject(prop_str));
// build new report
LineIntegralReport lineIntegralReport_2 =
simulation_0.getReportManager().createReport(LineIntegralReport.class);
// copy properties
lineIntegralReport_2.copyProperties(lineIntegralReport_0);
// set report name
lineIntegralReport_2.setPresentationName(prop_str + "FZ");
lineIntegralReport_2.getParts().setQuery(null);
// set report section
lineIntegralReport_2.getParts().setObjects(planeSection_1);
LineIntegralReport lineIntegralReport_3 =
simulation_0.getReportManager().createReport(LineIntegralReport.class);
lineIntegralReport_3.copyProperties(lineIntegralReport_1);
lineIntegralReport_3.setPresentationName(prop_str + "FX");
lineIntegralReport_3.getParts().setQuery(null);
lineIntegralReport_3.getParts().setObjects(planeSection_1);
}
}
}