summaryrefslogtreecommitdiff
path: root/circuitbuilder/scripts/add-n-components
diff options
context:
space:
mode:
Diffstat (limited to 'circuitbuilder/scripts/add-n-components')
-rw-r--r--circuitbuilder/scripts/add-n-components9
1 files changed, 9 insertions, 0 deletions
diff --git a/circuitbuilder/scripts/add-n-components b/circuitbuilder/scripts/add-n-components
new file mode 100644
index 0000000..c3e92d0
--- /dev/null
+++ b/circuitbuilder/scripts/add-n-components
@@ -0,0 +1,9 @@
+n = 16
+comp = "Output"
+component_class = builder.get_component_class(comp)
+for i in range(n):
+ component = component_class()
+ component.x = 1
+ component.y = 1 + i * builder.part_size * 1.01
+ if not builder.add_component(component):
+ print "Couldn't add component" \ No newline at end of file