Skip to main content
11-Garnet
July 29, 2025
Solved

Mass calculation

  • July 29, 2025
  • 5 replies
  • 9245 views

Hi 

I use creo 11.0.4.0. 

In relations  dosnt work formula 

MASA=PRO_MP_MASS
errorInvalid data type combination at right side of expression.

What is wrong. 

In Creo 7 works perfect.

TP_10167633_0-1753794850609.png

 

Regards T

Best answer by MartinHanak

@TP_10167633 wrote:

Hi,

Yes, this works.

How can I correct it to show only one decimal place, for example: 7.1 kg?

 Regards T

 


Hi,

MASA=rtos(ceil(PRO_MP_MASS,1))

5 replies

24-Ruby III
July 29, 2025
16-Pearl
July 29, 2025

What kind of parameter is MASA? Maybe you can try using MASA=MP_MASS(""), assuming the output should be a string? I'd also recommend putting this relation in post regen to avoid the double regeneration after switching materials. 

 

Creo 11.0 documentation:

 

Tdaugherty_0-1753801246011.png

 

18-Opal
July 29, 2025

If the RHS (right hand side) of the equation is a double you have to make sure that the LHS has the same type, you can have a miss match if the parameter exist before you have used this one in a relation. Just comment the relation, delete the MASA parameter and finally get rid of the comment. 

11-Garnet
July 30, 2025

Hi 

 

MASA in string parameter.

I have same relation in CREO 7 . But there is no problem.

 I try also MASA=MP_MASS(""), 

Dosn't work.

 

11-Garnet
July 30, 2025

Hi 

 

MASA in string parameter.

I have same relation in CREO 7 . But there is no problem.

 I try also MASA=MP_MASS(""), 

Dosn't work.

 

24-Ruby III
July 30, 2025

Hi,

use following relation.

masa=rtos(PRO_MP_MASS)

 

rtos ... real number to string conversion

11-Garnet
July 30, 2025

Hi,

Yes, this works.

How can I correct it to show only one decimal place, for example: 7.1 kg?

 Regards T

 

24-Ruby III
July 30, 2025

@TP_10167633 wrote:

Hi,

Yes, this works.

How can I correct it to show only one decimal place, for example: 7.1 kg?

 Regards T

 


Hi,

MASA=rtos(ceil(PRO_MP_MASS,1))