We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

DateTime

Anonymous
Not applicable
Is it possible to script IF TIME IS PAST 2400 AND LESS THEN 0600 PRINT "GO TO BED" ??
1 REPLY 1
Barry Kelly
Moderator
It is but you will never have a situation when the time is after 2400.
You will only have to look for time less than 0600.
dstr = ""
ch = OPEN ("DateTime", "", "%H")	!!get hours from date/time add-on
n = INPUT (ch, "", "", dstr)
CLOSE (ch)

n = SPLIT(dstr, "%n", num)	!!convert string to number

if num < 6 then
PRINT "Go to bed!"
endif
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11