|
[Sponsors] |
February 7, 2014, 07:02 |
Macro that rounds a value
|
#1 |
New Member
chris
Join Date: Feb 2014
Posts: 3
Rep Power: 12 |
I tried writing a macro that at some point needs to round a value. This is causing me an error, so maybe someone already knows how to round within a macro which seems to be a problem for me.
My current code looks like this (simplified) ... $!VarSet |A| = 5 $!VarSet |B| = 9 $!VarSet |C| = (|A|/|B|) $!VarSet |Crounded| = ROUND( |C| ) ... and the error message says that in $!VarSet |Crounded| = ROUND( |C| ) an error occured. Do I have to use a different way to get a rounded value in a macro? Thanks |
|
February 7, 2014, 09:05 |
|
#2 |
New Member
chris
Join Date: Feb 2014
Posts: 3
Rep Power: 12 |
Ok I found my solution.
Since round is not known as a function but ceil and floor are, I just add 0.5 and then use the ceil function. bye |
|
Tags |
macro, round |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
StarCCM+ Command line options and Macro execution | isidp | STAR-CCM+ | 8 | January 29, 2013 06:00 |
Macro Trouble -Winows Explorer Crashes with Macro | Martin Castillo | FLUENT | 1 | July 25, 2007 05:18 |
Macro problem | cfddummy | Siemens | 1 | April 9, 2007 13:37 |
macro not function! | guang ai | Siemens | 0 | July 25, 2004 19:53 |
Call a macro from a macro | Flav | Siemens | 2 | July 1, 2004 06:42 |