Skip to content

Commit

Permalink
exercise-3-missing execution
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdbroughton committed May 7, 2024
1 parent f1a2b97 commit 12cf77b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from pydantic import Field
from speckle_automate import AutomationContext, AutomateBase, execute_automate_function
from Utilities.helpers import flatten_base, speckle_print

from rules import RevitRules
import random


class FunctionInputs(AutomateBase):
Expand Down Expand Up @@ -131,3 +130,12 @@ def automate_function(

# set the automation context view, to the original model / version view
automate_context.set_context_view()



# make sure to call the function with the executor
if __name__ == "__main__":
# NOTE: always pass in the automate function by its reference, do not invoke it!

# pass in the function reference with the inputs schema to the executor
execute_automate_function(automate_function, FunctionInputs)

0 comments on commit 12cf77b

Please sign in to comment.