Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ignoring Same fields again and again

Hi All,

We have two volume fields like vol1 and vol2, and have number of dimensions.

Our requirement is to calculate sum vol1 and vol2, agnoring dimensions 1 to 5.

So we have written the expression like -

sum({<dim1=,dim2=,dim3=,dim4=,dim5=>}vol1) +sum({<dim1=,dim2=,dim3=,dim4=,dim5=>}vol2)

We have all other expressions which is using {<dim1=,dim2=,dim3=,dim4=,dim5=>} for number of times.

Is there is any way we can suppress the expression length and improve performance.

Please assist.

Regards,

MK

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

In the script you can set this variable like

SET vDim=dim1=,dim2=,dim3=,dim4=,dim5=;

View solution in original post

7 Replies
swuehl
MVP
MVP

You can define and use a variable for your set expression.

Not applicable
Author

Create a variable say vdimignore with definition as {<dim1=,dim2=,dim3=,dim4=,dim5=>}. Then use the variable in the expression as $(vdimignore). It reduces the length of your expressions and increases reusability. If there are any changes in the set expression, only variable expression has to be updated.

settu_periasamy
Master III
Master III

Hi,

create the variable,  then you can use it inside of sum

like vDim :

dim1=,dim2=,dim3=,dim4=,dim5=

Then, sum ({<$(vDim)>}vol1)

Anonymous
Not applicable
Author

Is there is any way, where I can get it from Script.

settu_periasamy
Master III
Master III

In the script you can set this variable like

SET vDim=dim1=,dim2=,dim3=,dim4=,dim5=;

Anonymous
Not applicable
Author

will this improve performance if we compare it with using variable.

settu_periasamy
Master III
Master III

I think so. Just assigned the text to the variable. Also, You can assign the calculation expression to the variable