BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
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
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!