hexagon logo

Declaring new variables in .cmd file

Hello everyone,
 
I need again some help from your side :
 
How can I create two new variables (I guess I need strings or something) into my .cmd file ?
How can I use these variables in order to replace the name of my assemblies and the name of my simulations.
 
Let's see the following example :
 
interface dialog execute dialog=.gui.ppt_file_export
numeric_results write &
result_set_component_name = .ASSEMBLY_NAME.SIMULATION_NAME.til_front_wheel_tire_forces.normal_front, &
                  .ASSEMBLY_NAME.SIMULATION_NAME.tir_front_wheel_tire_forces.normal_front, &
 
  .......................................................................
 
                  .ASSEMBLY_NAME.SIMULATION_NAME. other 20 more components &
!
order = ascending &
write_to_terminal = off &
file_name = "NAME.txt"
 
 
Instead of ASSEMBLY_NAME I want to have a variable named "model" and instead of SIMULATION_NAME I want to have a variable named "simulation".
 
In my eyes everything will look like :
 
declared variable = model
declared variable = simulation
interface dialog execute dialog=.gui.ppt_file_export
numeric_results write &
result_set_component_name = .model.simulation.til_front_wheel_tire_forces.normal_front, &
                  .model.simulation.tir_front_wheel_tire_forces.normal_front, &
 
  .......................................................................
 
                  .model.simulation. other 20 more components &
!
order = ascending &
write_to_terminal = off &
file_name = "NAME.txt"
Parents
  • Sounds like you should take a look at macros in Adams/View and use of parameters.
    What you would do is declaring the parameter '$analysis'. (does not seem to be a need to have the assembly as a separate parameter as the analysis would include the analysis name.
    And no, they are not string parameters, they are object type.
     
    So you macro would start as
     
    !USER_ENTERED_COMMAND my_postprocessing
    !
    ! $analysis:t=analysis:a
    !
    numeric_results write &
    result_set_component_name =$analysis.til_front_wheel_tire_forces.normal_front, &
                      $analysis.tir_front_wheel_tire_forces.normal_front, &
                     $analysis. other &
    order = ascending &
    write_to_terminal = off &
    file_name = "NAME.tx
Reply
  • Sounds like you should take a look at macros in Adams/View and use of parameters.
    What you would do is declaring the parameter '$analysis'. (does not seem to be a need to have the assembly as a separate parameter as the analysis would include the analysis name.
    And no, they are not string parameters, they are object type.
     
    So you macro would start as
     
    !USER_ENTERED_COMMAND my_postprocessing
    !
    ! $analysis:t=analysis:a
    !
    numeric_results write &
    result_set_component_name =$analysis.til_front_wheel_tire_forces.normal_front, &
                      $analysis.tir_front_wheel_tire_forces.normal_front, &
                     $analysis. other &
    order = ascending &
    write_to_terminal = off &
    file_name = "NAME.tx
Children
No Data