Jump to content

Data Visualisation - Issues


Recommended Posts

Hi

 

Attached is a file in which I have tried to set up a very simple Data Visualisation.

 

However, no matter how much reading of the University guides, googling, youtubing etc. I can not get it to work.

 

Essentially, I have attached a Record to each of the bottom objects, and the Data Visualisation is supposed to display them in different colours/shades depending on what Level I have allocated in the Record attached.

 

Just does not work. I'm assuming I have made some simple mistake but have no idea what.

 

Any help would be appreciated.

 

Kind regards

 

Mike

C10-2024-01 - Yiewsley and West Drayton.vwx

Link to comment
4 minutes ago, Michael Siggers said:

Hi @line-weight

 

Just tried changing the Filed in the Record to a 'Number' format rather than and 'Integer' and it has fixed it.............. for now.

 

I thought a number was the same thing as an integer?

 

Mike

 

I actually tried the same thing independently, but without any success!

Edited by line-weight
Link to comment

The 'Drainage Crates' DV wasn't working me either but when I recreated it as a brand new DV everything was fine. I didn't need to make any changes to the Record. I don't know whether DVs becoming corrupted is a thing but that's what it looked like to me. The new version of the DV is working completely normally for me.

Edited by Tom W.
Link to comment
1 hour ago, Michael Siggers said:

I thought a number was the same thing as an integer?

Integer is a subset of numbers.  Numbers (or Real Numbers) are floating point values that can have any value after the decimal point. I believe VW works to 12 decimal points and round at the end. So a Number that is displaying as 6 could actually be stored at  5.9999999999 or 6.00000000001.  If you do an Equals comparison those values may or may not be considered to be the same.

 

Integers are numbers that have nothing after the decimal point. So a value of 6 is stored as exactly 6.

 

If you compare an Integer of 6 to a Real that is stored at 5.9999999999 and do an Equals comparison they will not be considered to be equal.

 

Please don't make me dig deeper into IEEE 794 which is the Bible for how computers store floating point numbers. Just accept that it is possible to have a "number" in Vectorworks that can not be exactly represented in floating point notation and that a rounded value will be used instead. Since this rounding is usually at around 12 decimal places it typically does not matter in VW drawings.

  • Like 2
Link to comment
19 minutes ago, Pat Stanford said:

Please don't make me dig deeper into IEEE 794 which is the Bible for how computers store floating point numbers

🙂 🙂 🙂 please do 🙂

 

Very Informative. Thank you. It did ring a few bells back to when I did Computer Studies in the 80s.

 

Kind regards

 

Mike

Link to comment

Short version is that there is a difference between what can be calculated/displayed in Base 2 (binary) versus what can be displayed in Base 10 (Decimal).  For integers it does not matter except for how many Integers can be displayed by a given number of decimal bits.

 

8 bits can hold 256 different integers (0-255)

16 bits can hold 65636 different Integers. In Vectorscript, this is called an Integer and actually holds the signed values of -32,768 to 32,767

32 bits can hold over 4 billion different integers. In Vectorscript this is called a LongInt and actually holds the signed values of -2,147,483,648 to 2,147,483,647

 

When you get to floating point number is where it gets complicated. Maybe I will get back to describing that at a later time when I am looking to procrastinate more. 😉

 

  • Like 1
Link to comment

But @Pat Stanford should any of this affect why a Data Vis is working or not working in this example i.e. where the 'number' is manually entered in a Record field? Presumably it shouldn't make any difference whether a '1' is entered as a Number, Integer or Text in terms of the DV working?

Link to comment

You are right it should not impact the DV working, but it will depend on how the field is defined.

 

If the value in the field is supposed to be 6....

 

If it is defined as Text then a statement like Rec.Fld=6 will fail because 6 is a number not text. It would have to be Rec.Fld='6'

If it is defined as an integer then Rec.Fld=6 should work.

If it is defined as a real then Rec.Fld=6 may work depending on how the data was actually entered. If it was entered by typing 6 into the field then the comparison should be correct. If it is the result of a calculation and the actual decimal value is 5.99999999 then that MAY not =6 depending on what type of rounding  is done internally and how many decimal places of accuracy you have.

 

Not saying that is what is happening in your DVs, but I have seen a lot of people confused when 6≠'6' or when 6≠5.999999999 which is set to display at 3 decimal points and shows 6.000.

 

HTH

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...