Commit bd1c386 1 parent c195b5a commit bd1c386 Copy full SHA for bd1c386
File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change
1
+ Add support for loading libraries along the main eda file
Original file line number Diff line number Diff line change 1
1
import json
2
- from dataclasses import dataclass , field
2
+ from dataclasses import dataclass
3
3
from pathlib import Path
4
4
from time import sleep
5
5
from typing import Optional
@@ -63,6 +63,12 @@ def new_connection(self):
63
63
64
64
send_data = {"version" : "0.2.2" }
65
65
66
+ libs = data .get ("libraries" , {})
67
+ for lib_dict in libs :
68
+ lib = pya .Library ()
69
+ lib .register (lib_dict ["name" ])
70
+ lib .layout ().read (lib_dict ["file" ])
71
+
66
72
def load_existing_layout ():
67
73
for i in range (window .views ()):
68
74
view = window .view (i )
@@ -100,6 +106,7 @@ def load_existing_layout():
100
106
connection .write (json .dumps (send_data ).encode ("utf-8" ))
101
107
connection .flush ()
102
108
return new_view
109
+
103
110
if window .views () > 0 :
104
111
view = load_existing_layout ()
105
112
else :
@@ -129,8 +136,7 @@ def load_existing_layout():
129
136
l2n .read (l2n_path )
130
137
l2n_i = view .add_l2ndb (l2n )
131
138
view .show_l2ndb (l2n_i , view .active_cellview ().cell_index )
132
-
133
-
139
+
134
140
else :
135
141
connection .waitForReadyRead (100 )
136
142
You can’t perform that action at this time.
0 commit comments