Web Scene Attribute numbers

4537
15
Jump to solution
08-27-2014 01:34 PM
LukeCzar
New Contributor III

HI,

I am having a problems with my attributes, sometimes the numbers look like that " 23.34"  and sometimes like that "23.3400000000000000"

How can I set it only to 2 decimal places so all my attributes will look like that " 00.00"?

The attributes are the same in ArcMap, yet in CityEngine they are not

In the attribute "Height" one building is 23.43 and the other 23.9800000000000

decimals.png

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

You could use the reports like this:

# Use connection editor to attach to your object attribute in GDB.

attr myFloat = 0

Shape -->

     report("myFloat", myFloat)

And under reports it seems the numbers display less decimals. See image. Does that help any?

Capture.JPG

View solution in original post

0 Kudos
15 Replies
DevinLavigne
Occasional Contributor III

Luke - where are you having this issue - in a Web Scene? Also, is the data coming from a shapefile attribute? And what do the attribute numbers look like in City Engine. It might be easiest to edit the shapefile/geodatabase to trim the data their first before bringing it into CityEngine. I believe City Engine will display only 6 decimal places. I'd like to help but I need a little more.

0 Kudos
LukeCzar
New Contributor III

Hi Devin,

Thanks for a quick respond!

Yes, it is a shapefile (Gdb) and it looks fine in CE, but when I export it to WebScene it shows as something like this 23.43000000 instead of 23.43

WebScene displays actually in my case 13 decimal places, we set the number values to 2 decimal places, but it is still wrong in the WebScene

So in one attribute "Height" some numbers are correct (0.00) and other are like that (0.000000000000)

How can I set all the numbers to be only 2 decimals in Web Scene?(we did that in ArcMap, and CE)

Luke

0 Kudos
by Anonymous User
Not applicable

You could use the reports like this:

# Use connection editor to attach to your object attribute in GDB.

attr myFloat = 0

Shape -->

     report("myFloat", myFloat)

And under reports it seems the numbers display less decimals. See image. Does that help any?

Capture.JPG

0 Kudos
LukeCzar
New Contributor III

Great!

It works, but how do I hide the attributes, myFloat (on Top?)

Previously in CE 2012 we had to write a Rule in order to display the attr in the WebScene, but now it shows up anyway

Thanks a lot!

Luke

0 Kudos
PascalMueller
New Contributor III

As mentioned below, you cannot hide specific attributes.

However what you can do, is to export only the reports without the attributes. To do this, set the export parameter "Metadata" to "Reports" instead of "All". You can do this per layer.

LukeCzar
New Contributor III

yes, and how can I import text to other attributes to be display as report?

Lukasz

0 Kudos
LukeCzar
New Contributor III

I have one more question,

I noticed that reports do not work with text, is that right? so how can I combine attributes and reports?

How can I unselected some attributes from showing them in webscene?

Thanks!!

Lukasz

0 Kudos
by Anonymous User
Not applicable

Currently, reporting of text values is not supported in the reports window or the web scene, but if you store text values in reports, you can access those values during the "python based export". This is mainly used in exporting to other file formats. So for now, you can report text values, but must access the values through python.

0 Kudos
by Anonymous User
Not applicable

I don't believe there is a way to block attributes or reports from showing in the web scene.

0 Kudos