Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Tecnomatix
- Forums
- Blogs
- Knowledge Bases
- Groups

- Siemens PLM Community
- Tecnomatix
- Plant Simulation
- Re: Decimal

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Decimal

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-19-2016 04:34 AM

Hi everyone,

I'm using an HTMLrapport to collect results. The results (time and amount) is in 11 or 12 decimals. How can I change this is 1 or 2 decimals?

Greetings,

Paul

5 REPLIES

Re: Decimal

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-19-2016 04:42 AM

You can set the max. number of places behind the decimal point as an argument like this:

[Line.length, 2]

If you want do display an exact number of decimal places (even if the places are zero) you can do it like this:

[Line.length, 02]

_________________________________________________________________

Did you like the answer? Then click the Thumbs Up button.

Did the answer solve your problem? Then accept the answer as solution.

Did you like the answer? Then click the Thumbs Up button.

Did the answer solve your problem? Then accept the answer as solution.

Re: Decimal

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-19-2016 05:16 AM

Thanks for replying.

But how do I put an argument in the HTMLreport?

#Geproduceerde volumes **Totale productie = [FluidDrain.statThroughput]** **Productie per dag = [FluidDrain.statThroughputPerDay]** **Productie per uur = [FluidDrain.statThroughputPerHour]**

The above is one section of my report. The results of this are with 11 decimals but 2 is enough. When I put your argument behind it iw does not work. What am I doing wrong?

Paul

Re: Decimal

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-19-2016 06:53 AM

Hello, have just tested (using a normal Drain) and their suggested edit should work.

#Geproduceerde volumes **Totale productie = [FluidDrain.statThroughput,2]** **Productie per dag = [FluidDrain.statThroughputPerDay,2]** **Productie per uur = [FluidDrain.statThroughputPerHour,2]**

On a quick side note, when using '02' to display 2 decimal places reguardless I have noticed it only works for real values and not for integers or time values.

JamesM

Highlighted
#

Re: Decimal

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-19-2016 07:04 AM

Hi James,

Thanks, this works!

Do you maybe know a way to do this same thing for times?

Greetings,

Paul

Re: Decimal

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-19-2016 08:40 AM - edited 05-19-2016 08:46 AM

This actually also works for times (for example [SingleProc.statFailTime, 2] ), except if the time is read from a global variable. Although the precision argument generally works for global variables too, it does not work for global variables of data type time (which seems to be a bug).

As a workaround, instead of writing [Variable, 2], you can write [Variable.value, 2]

Note: For some reason the leading zero does not work for the data type time.

_________________________________________________________________

Did you like the answer? Then click the Thumbs Up button.

Did the answer solve your problem? Then accept the answer as solution.

Did you like the answer? Then click the Thumbs Up button.

Did the answer solve your problem? Then accept the answer as solution.

Follow Siemens PLM Software

© 2019 Siemens Product Lifecycle Management Software Inc