TAGGED: udf
-
-
April 3, 2023 at 4:55 am
Kenneth.Fung
SubscriberI have two define_on_demand macros called "run1" and "run2".
"run1" spits out an output x. "run2" uses x, as well as a parameter y obtained from Get_Input_Parameter, to spit out another output z, so z = z(x,y).
I am trying to build a workflow that does something like this:
1. Call "run1" to get x.
2. Set a value of y, call "run2" to get z, save results.
3. Repeat previous step for different values of y.The reason I do not want to combine "run1" and "run2" into a single define_on_demand macro is because I only need to execute "run1" once. If I combine it into a single macro with "run2", then "run1" would execute every single time with "run2", which is unnecessary and potentially time-consuming.
Is there a way to do this?
-
April 3, 2023 at 5:33 am
Kenneth.Fung
SubscriberI forgot to add, is x an array. I'm aware that I can achieve the above by using scheme variables, but this would only work if x is real or an integer. Is it possible to do this if x is an array?
-
- The topic ‘Passing variables between DEFINE_ON_DEMAND macros’ is closed to new replies.
-
5874
-
1906
-
1420
-
1306
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.