User Tools

Site Tools


visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression [2024/06/19 12:52] sgrangervisual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression [2024/07/17 15:46] (current) – created sgranger
Line 1: Line 1:
-**set_pipeline_parameter_from_expression** +====== Set Pipeline Parameter From Expression ====== 
-/parameter_name=t_mass + 
-/expression=metric::processed::height * 4.6 +**Set_Pipeline_Parameter_From_Expression** 
-/as_integer=true+/PARAMETER_NAME=t_Mass 
 +/EXPRESSION=METRIC::PROCESSED::HEIGHT * 4.6 
 +/AS_INTEGER=TRUE
 **;** **;**
-the pipeline parameter contains the value of the expression.+The pipeline parameter contains the value of the expression.
  
-getting the syntax correct can be challenging because there can be a conflict between the & as a concatenation parameter in a pipeline parameter and the & as a boolean "and" operator.+Getting the syntax correct can be challenging because there can be a conflict between the & as a concatenation parameter in a pipeline parameter and the & as a boolean "and" operator.
  
-for many pipeline commands visual3d recognizes the conflict and handles the situations in a context specific way.+For many pipeline commands Visual3D recognizes the conflict and handles the situations in a context specific way.
  
-visual3d cannot make that distinction and "bad" things happen.+Visual3D cannot make that distinction and "bad" things happen.
  
-consider the following which uses string comparisons and a pipeline parameter in the expression:+Consider the following which uses string comparisons and a pipeline parameter in the expression:
  
-**set_pipeline_parameter_from_expression** +**Set_Pipeline_Parameter_From_Expression** 
-/parameter_namemval +/PARAMETER_NAMEMVAL 
-/expression=(&::tag_names& == utility) * 4.6 +/EXPRESSION=(&::TAG_NAMES& == Utility) * 4.6 
-/as_integer=false+/AS_INTEGER=FALSE
 **;** **;**
-the goal was to set mval to 4.6 when the pipeline parameter tag_names was equal to the string "utility";+The goal was to set MVAL to 4.6 when the pipeline parameter TAG_NAMES was equal to the string "Utility";
  
-one solution is to separate the pipeline parameter from the expression.+One solution is to separate the pipeline parameter from the expression.
  
-**set_pipeline_parameter** +**Set_Pipeline_Parameter** 
-/parameter_name=temp +/PARAMETER_NAME=TEMP 
-/parameter_value=(&::tag_names& == utility)*4.6+/PARAMETER_VALUE=(&::TAG_NAMES& == Utility)*4.6
 **;** **;**
 \\ \\
  
  
-**set_pipeline_parameter_from_expression** +**Set_Pipeline_Parameter_From_Expression** 
-/parameter_name=t_mass +/PARAMETER_NAME=t_Mass 
-/expression=::temp +/EXPRESSION=::TEMP 
-/as_integer=false+/AS_INTEGER=FALSE
 **;** **;**
 \\ \\
-another solution, which is even trickier in terms of syntax is:+Another solution, which is even trickier in terms of syntax is:
  
-**set_pipeline_parameter_from_expression** +**Set_Pipeline_Parameter_From_Expression** 
-/parameter_name=scott +/PARAMETER_NAME=SCOTT 
-/expression=("&::tag_names&"==" utility") +/EXPRESSION=("&::TAG_NAMES&"==" Utility") 
-! /as_integer=true+! /AS_INTEGER=TRUE
 **;** **;**
-this forces visual3d to recognize the strings as strings and the & is treated correctly.+This forces Visual3D to recognize the strings as strings and the & is treated correctly.
  
 \\ \\
  
  
-==== get global metrics ====+=== Get global metrics ===
  
-global metrics can be set to a pipeline parameter by setting "global" in front of the metric name. more information about expressions can be found [[visual3d:documentation:pipeline:expressions:overview|here]].+Global metrics can be set to a pipeline parameter by setting "GLOBAL" in front of the metric name. More information about expressions can be found [[Visual3D:Documentation:Pipeline:Expressions:Expressions_Overview|here]].
  
-**set_pipeline_parameter_from_expression** +**Set_Pipeline_Parameter_From_Expression** 
-/parameter_name=katie +/PARAMETER_NAME=KATIE 
-/expression=global::metric::processed::mass +/EXPRESSION=GLOBAL::METRIC::PROCESSED::MASS 
-/as_integer=false+/AS_INTEGER=FALSE
 **;** **;**
  
  
visual3d/documentation/pipeline/pipeline_commands/set_pipeline_parameter_from_expression.1718801553.txt.gz · Last modified: 2024/06/19 12:52 by sgranger