The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"[Solved] Use of macro within loop parameter deletes all attributes"
Dear all,
I discovered that it is not possible to use "generate macro" within in the "loop parameter" operator. In that case the process shows no output at all.
Please see also my post "Missing output of Loop Parameters operator" regarding a strange outcome with this parameter.
http://rapid-i.com/rapidforum/index.php/topic,5288.0.html
Best regards
Sachs
I discovered that it is not possible to use "generate macro" within in the "loop parameter" operator. In that case the process shows no output at all.
Please see also my post "Missing output of Loop Parameters operator" regarding a strange outcome with this parameter.
http://rapid-i.com/rapidforum/index.php/topic,5288.0.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.003">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.2.003" expanded="true" name="Process">
<process expanded="true" height="410" width="279">
<operator activated="true" class="generate_data" compatibility="5.2.003" expanded="true" height="60" name="Generate Data" width="90" x="45" y="30"/>
<operator activated="true" class="loop_parameters" compatibility="5.2.003" expanded="true" height="76" name="Loop Parameters" width="90" x="179" y="30">
<list key="parameters">
<parameter key="Windowing.label_attribute" value="att1,att2"/>
</list>
<process expanded="true" height="428" width="652">
<operator activated="true" class="series:windowing" compatibility="5.1.002" expanded="true" height="76" name="Windowing" width="90" x="45" y="30">
<parameter key="create_label" value="true"/>
<parameter key="label_attribute" value="att2"/>
</operator>
<operator activated="true" class="generate_macro" compatibility="5.2.003" expanded="true" height="76" name="Generate Macro" width="90" x="246" y="30">
<list key="function_descriptions">
<parameter key="mymacro" value="param("Windowing", "label_attribute")"/>
</list>
</operator>
<connect from_port="input 1" to_op="Windowing" to_port="example set input"/>
<connect from_op="Windowing" from_port="example set output" to_op="Generate Macro" to_port="through 1"/>
<connect from_op="Generate Macro" from_port="through 1" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_performance" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
<connect from_op="Generate Data" from_port="output" to_op="Loop Parameters" to_port="input 1"/>
<connect from_op="Loop Parameters" from_port="result 1" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Best regards
Sachs
Tagged:
0
Answers
if you have a look at the process log, you will see the following message: That, means, that the Generate Macro operator had an error, and the loop iterations did not complete.
The reason is that you currently can't use the param() function in Generate Macro.
Best, Marius
Ahh... the log... after seeing the solution I am always wondering why I haven't seen it before...
Thanks!
Best,
~Marius