Moving Family Periodically

Hi all, so i tried moving the family i created periodically ,is there a way where i run the code and family gradually moves upto certain point ,i can gradually move the family with number slider as shown but for this i need to open dynamo and it is not possible via dynamo player.

once the node datetime.now is placed in the script, you have a third option in the run state button in the low left corner of Dynamo.
Automatic,Manual and Periodic
Get the value of the periodic run and translate it to a number value (String to Number)
something like this

4 Likes

on other hand i was thinking if i can just add a for loop so that value automatically changes and then i wouldn’t need number slider and script would run with normal automatic or manual mode, since the value would be changing automatically, is this possible?

i think the execution time of the graph would be way too fast for the regeneration of the graphics in Revit.
So you would end up with the begin state and the end state

2 Likes

in my clipboard.getfrom node i dont have this toggle option,how did u got this?

i changed it a bit so you don’t need the clipboard


You may need to vary the last multiplication a bit

1 Like

thanks alot ,is there a way it stops after specific seconds

I wish, then i could run the script and stop time itself :slight_smile:
While it runs i think swith off periodic will help.
try

yes with stopping the script it does stops ,but i was thinking of a way to input time interval starting from 0 to 20 seconds so that at specific time the spans stops going up without stopping the script

This node out of the DateTime.Now node is a good start: https://dictionary.dynamobim.com/#/Core/DateTime/Action/Components

Take the seconds value, and divide that by 3 and round down with a Math.Floor node.

Use that value to set the ‘frame’, and you’ll get 20 possible frame values 0…19 as the options.

From there build a list of [0,frame,19], and use a Math.RemapRange where the minimum is your lowest parameter value and your maximum is your highest desired parameter value.

Then pull the value at index 1 (adjustedFrame[1]; ) and use that to set your parameter value. Set the run period to 3000ms and enjoy - every 3 second you’ll get a new value.

hey thanks i tried,am i going in right direction i didnt understand the part of making frame can you visually show me