Skip to content

Commit

Permalink
Ver 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhsukeogawa authored Jan 27, 2025
1 parent 0aecfe1 commit 69b3d86
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 4 deletions.
11 changes: 9 additions & 2 deletions network_sketcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def click_action_sub1_1(self, click_value,push_array):
self.sub1_3_label_4 = tk.Label(self.sub1_3, textvariable=self.text_sub1_3, font=("", 10), background="#FFF9E7")
self.sub1_3_label_4.grid(row=2, column=1, columnspan=3, sticky='W', padx=5, pady=20)
#ns_front_run.sub_excel_master_1(self, file_type_array)
print('--- Update to the Master file ---')
#print('--- Update to the Master file ---')

### pre-defined for dev parameter
self.inFileTxt_92_1 = tk.Entry(self.sub1_3)
Expand Down Expand Up @@ -858,7 +858,7 @@ def click_action_sub3_1(self, click_value,push_array):
self.sub3_1_label_4 = tk.Label(self.sub3_1, textvariable=self.text_sub3_1, font=("", 10), background="#E5F4F7")
self.sub3_1_label_4.grid(row=2, column=1, columnspan=3, sticky='W', padx=5, pady=20)
#ns_front_run.sub_excel_master_1(self, file_type_array)
print('--- Update to the Master file ---')
#print('--- Update to the Master file ---')

### pre-defined for dev parameter
self.inFileTxt_11_1 = tk.Entry(self.sub3_1)
Expand Down Expand Up @@ -935,27 +935,34 @@ def click_action_sub3_1(self, click_value,push_array):
ns_def.get_backup_filename(full_filepath_master)

### l1_device_port_name_sync_with_l1_master
print('--- Layer1 sync ---')
self.click_value = '12-3'
network_sketcher_dev.ns_front_run.click_action(self, '12-3')

### l2_device_table_sync_with_l2_master
print('--- Layer2 sync ---')
self.click_value = 'L2-2-3'
network_sketcher_dev.ns_front_run.click_action(self, 'L2-2-3')

### l3_device_table_sync_with_l3_master
print('--- Layer3 sync ---')
self.click_value = 'L3-2-3'
network_sketcher_dev.ns_front_run.click_action(self, 'L3-2-3')

### l1_device_port_name_sync_with_l2l3_master
print('--- Port sync(1/3) ---')
ns_sync_between_layers.l1_device_port_name_sync_with_l2l3_master(self)

### l2_device_port_name_sync_with_l3_master
print('--- Port sync(2/3) ---')
ns_sync_between_layers.l2_device_port_name_sync_with_l3_master(self)

### l2_master_sync_with_l3_master
print('--- Port sync(3/3) ---')
ns_sync_between_layers.l2_device_table_sync_with_l3_master(self)

# attribute table sync to master at ver 2.4.0
print('--- Attribute sync ---')
ns_attribute_table_sync_master.ns_attribute_table_sync_master.__init__(self)

filename = os.path.basename(full_filepath_device)
Expand Down
2 changes: 1 addition & 1 deletion network_sketcher_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ def click_action(self,click_value):
import ns_l1_table_sync_master
flag_return = ns_l1_table_sync_master.ns_l1_table_sync_master.__init__(self)

print(self.inFileTxt_12_2.get())
#print(self.inFileTxt_12_2.get())
full_filepath = self.inFileTxt_12_2.get()

self.inFileTxt_11_1.delete(0, tkinter.END)
Expand Down
26 changes: 26 additions & 0 deletions ns_ddx_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,13 +607,39 @@ def add_shape(self):
self.shape.text_frame.paragraphs[0].alignment = PP_ALIGN.LEFT
self.shape.text_frame.vertical_anchor = MSO_ANCHOR.TOP
shape_fill.fore_color.rgb = RGBColor(250, 251, 247)

### change color at ver 2.4.0
tmp_rgp_color = self.attribute_tuple1_1[temp_shape_text]
if tmp_rgp_color[0] + 15 >= 256:
r = 255
else:
r = tmp_rgp_color[0] + 15

if tmp_rgp_color[1] + 10 >= 256:
g = 255
else:
g = tmp_rgp_color[1] + 10

if tmp_rgp_color[2] + 25 >= 256:
b = 255
else:
b = tmp_rgp_color[2] + 25

shape_fill.fore_color.rgb = RGBColor(r, g, b)


self.shape.text_frame.paragraphs[0].font.size = Pt(self.folder_font_size)
self.shape.text_frame.margin_left = Inches(0.1)
self.shape.text_frame.margin_top = Inches(0.05)

### WAY POINT ###
if self.click_value == 'L2-3-2' and self.input_ppt_mata_excel.active.cell(temp_temp_style_shape_row, 5).value == 'BLUE':
shape_fill.fore_color.rgb = RGBColor(237, 242, 249)
### change color at ver 2.4.0
tmp_rgp_color = self.attribute_tuple1_1[temp_shape_text]
shape_fill.fore_color.rgb = RGBColor(tmp_rgp_color[0], tmp_rgp_color[1],tmp_rgp_color[2])


self.shape.adjustments[0] = 0.1
self.shape.text_frame.paragraphs[0].alignment = PP_ALIGN.LEFT
self.shape.text_frame.vertical_anchor = MSO_ANCHOR.TOP
Expand Down
1 change: 1 addition & 0 deletions ns_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,7 @@ def get_attribute_title_list(self, master_file_path):

### add <<ATTRIBUTE>> to Mater file of pre ver 2.3
if attribute_array[0] == '_NOT_FOUND_':
print('--- Attribute data not found, add it ---')
excel_file_path = self.inFileTxt_L2_3_1.get()

### check file open
Expand Down
2 changes: 1 addition & 1 deletion ns_egt_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def create_excel_gui_tree(input_excel_name,output_excel_name,NEW_OR_ADD,egt_make
if NEW_OR_ADD == 'NEW':
output_tree_excel.active = output_tree_excel[first_sheet_name]
output_tree_excel.save(output_excel_name)
print('Output Excel file saved successfully -> ' + output_excel_name)
#print('Output Excel file saved successfully -> ' + output_excel_name)
return(output_tree_excel)

'''
Expand Down
1 change: 1 addition & 0 deletions ns_l1_master_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

class ns_l1_master_create():
def __init__(self):
print('--- Master file create ---')
'''parameter '''
flag_put_line_tag = True #Write Tag Name in <<POSITION_LINE>>
line_offset_value = 0.2 # in <<POSITION_LINE>> inches
Expand Down
1 change: 1 addition & 0 deletions ns_l1_table_from_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self):
'''
make device table excel file
'''
print('--- Device file create ---')
#parameter
ws_name = 'Master_Data'
tmp_ws_name = '_tmp_'
Expand Down

0 comments on commit 69b3d86

Please sign in to comment.