Last active
December 8, 2015 18:33
-
-
Save tmshv/5128f7141a6db0704709 to your computer and use it in GitHub Desktop.
Grasshopper Last State
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# x is input value with list type | |
import rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
import Rhino | |
sc.doc = Rhino.RhinoDoc.ActiveDoc | |
lastValue = rs.GetDocumentData('hello', 'lastState') | |
currentValue = ','.join(map(str, x)) | |
rs.SetDocumentData('hello', 'lastState', currentValue) | |
if lastValue != currentValue: | |
a = 1 | |
else: | |
a = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment