Model Time of Day - Does Anybody Know of a Script or Plugin?
-
Hello,
My name is Frank, and although relatively new to the sketchup community, I have taken a keen interest in dynamic components. One thing I'm trying to design is a clock that will show the time based on the time of day used by the model for the shadow settings. I actually tried to "reverse engineer" a solution using SUNANGLE, SUNELEVATION and LAT (which with a bit of knowledge of speherical geometry and celestial navigation, one can derive the time of day). Alas, these sketchup functions do not update automatically when you change the model time of day. So I figured if I had to go in and get (or make) a script to take care of this automatic update problem, I may as well go after the data I want directly -- model time of day.
So, if anybody knows of (a) an existing plug-in or script that has, or could be adapated to make, the functionality of retrieving model time of day and making it available as a "custom" sketchup function for use in DCs, or (b) point me in the right direction, I'll head down that path.
Thanks!
Frank Borik
-
Hi Frank,
There are a couple examples on the forum of adding custom functions to DC. Search for "atan"
Here's one for example:
http://sketchucation.com/forums/viewtopic.php?f=180&t=37083&hilit=dynamic+atan#p327231
-
IF you can, access the
ShadowInfo
hash directly rather than changing EVERYONE's DynamicComponent class.See: ShadowInfo
P.S.: It would be nice if possible, to append a custom DC function, in a singleton manner, to ONLY the specific DC instance in question, rather than modify EVRYONE's set of DC functions. (But I'm not sure it can be done, the way the DCs are currently coded.)
Advertisement