Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Random numbers in 2d script

fuzzytnth3
Booster
Hi all

I'm trying to write a script for an object that will display random/different people in 2d for elevation drawings. Problem is that the random numbers that ArchiCAD generates are generally the same and not very random!

Is there some way I can force ArchiCAD to generate better random numbers?

I remember writing a programme for my Psion that used random numbers and the best way it did it was getting the time in seconds and multiply that with a "random" number and then get the interger of that result. This was due to the Psion generating somewhat limited random numbers.

Below is the script which calls up a Fragment based on the random number.

10:
Randper= INT (RND (15))
fill bft
pen bpn
fragment2 Randper,1
RETURN
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
30 REPLIES 30
Lingwisyer
Guru
It would appear that you are unable to use the rng command in custom window sashes and custom door leaves.



Ling.


Update: I am not quite sure what has changed, but it is working for me now inside custom window sashes and custom door leaves.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660