🎯
- data-shapes.io | orkestra.online
- @data_shapes
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
#Copyright (c) mostafa el ayoubi | |
#www.data-shapes.net 2016 elayoubi.mostafa@gmail.com | |
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import* | |
clr.AddReference('ProtoGeometry') | |
from Autodesk.DesignScript.Geometry import * |
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
#Copyright (c) mostafa el ayoubi | |
#www.data-shapes.net 2016 elayoubi.mostafa@gmail.com | |
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import* | |
clr.AddReference('ProtoGeometry') | |
from Autodesk.DesignScript.Geometry import * |
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
#Copyright (c) mostafa el ayoubi , 2016 | |
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com | |
#This code was inspired by Jeremy Tammik @Jeremytammik | |
def flatten(container): | |
for i in container: | |
if isinstance(i, (list,tuple)): | |
for j in flatten(i): | |
yield j | |
else: |
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
#Copyright (c) mostafa el ayoubi , 2016 | |
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com | |
#This code was inspired by Jeremy Tammik @Jeremytammik | |
def parametersnapshot(x): | |
parameters = x.Parameters | |
paramnames = [p.Definition.Name for p in parameters] | |
#Sorting is important because the parameters are queried in random order. | |
#We need to make sure the snapshots are ordered in the same way so we can compare them. | |
sortedindex = sorted(range(len(paramnames)), key = lambda k : paramnames[k]) |
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
#Copyright (c) mostafa el ayoubi , 2016 | |
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com | |
import clr | |
clr.AddReference('System.Windows.Forms') | |
clr.AddReference('System.Drawing') | |
from System.Drawing import Point | |
from System.Windows.Forms import Application, Button, Form, Label, TextBox, CheckBox, FolderBrowserDialog, OpenFileDialog, DialogResult, ComboBox, FormBorderStyle | |
from System.Collections.Generic import * |
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
#Copyright (c) mostafa el ayoubi , 2016 | |
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com | |
import clr | |
try: | |
clr.AddReference('System.Windows.Forms') | |
clr.AddReference('System.Drawing') | |
from System.Drawing import Point , Size , Graphics, Bitmap, Image, Font, FontStyle, Icon, Color | |
from System.Windows.Forms import Application, Button, Form, Label, ColumnHeader, TextBox, CheckBox, FolderBrowserDialog, OpenFileDialog, DialogResult, ComboBox, FormBorderStyle, ListView, ListViewItem , SortOrder, Panel, ImageLayout, GroupBox |
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
#Copyright (c) mostafa el ayoubi , 2016 | |
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com | |
import clr | |
clr.AddReference('System.Windows.Forms') | |
clr.AddReference('System.Drawing') | |
from System.Drawing import Point | |
from System.Windows.Forms import Application, Button, Form, Label, TextBox, CheckBox, FolderBrowserDialog, OpenFileDialog, DialogResult | |
class MultiTextBoxForm(Form): |