Skip to content

Commit

Permalink
Ver 2.3.4
Browse files Browse the repository at this point in the history
Ver 2.3.4
  • Loading branch information
yuhsukeogawa authored Dec 23, 2024
1 parent 5a0dd15 commit 7dabe65
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion network_sketcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def click_action_sub(self, click_value, target_area_name):
ns_def.messagebox_file_open(str(self.outFileTxt_11_2.get()).replace('[MASTER]',''))

if click_value == 'self.self.sub2_6_button_1': # Click "VPNs on L1"
print('--- Click "VPNs on L1" ---')
#print('--- Click "VPNs on L1" ---')
### create L1 Table with [VPNs_on_L1]]
self.click_value = 'VPN-1-1'
network_sketcher_dev.ns_front_run.click_action(self, '2-4-3')
Expand Down
14 changes: 0 additions & 14 deletions network_sketcher_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,6 @@ def click_action(self,click_value):
ns_l2_table_from_master.ns_l2_table_from_master_l2_sheet.__init__(self)

input_excel_master_data.close()
# view complete
#tkinter.messagebox.showinfo('info', 'successfully completed')

if click_value == 'L2-2-1': # select browse
fTyp = [("", ".xlsx")]
Expand Down Expand Up @@ -1062,9 +1060,6 @@ def click_action(self,click_value):
import ns_l2_table_sync_master
ns_l2_table_sync_master.ns_l2_table_sync_master.__init__(self)

# view complete
#tkinter.messagebox.showinfo('info', 'successfully completed')

if click_value == 'L2-3-1': # select browse
fTyp = [("", ".xlsx")]
iDir = os.path.abspath(os.path.dirname(sys.argv[0]))
Expand Down Expand Up @@ -1112,7 +1107,6 @@ def click_action(self,click_value):
# view complete
ns_def.messagebox_file_open(self.output_ppt_file)


if click_value == 'L3-1-1': # select browse
fTyp = [("", ".xlsx")]
iDir = os.path.abspath(os.path.dirname(sys.argv[0]))
Expand Down Expand Up @@ -1169,9 +1163,6 @@ def click_action(self,click_value):
iDir = os.path.abspath(os.path.dirname(sys.argv[0]))
self.inFileTxt_L3_2_2_backup= iDir + ns_def.return_os_slash() + os.path.splitext(os.path.basename(self.inFileTxt_L3_2_2.get()))[0] + '_backup' + '.xlsx'

# check : file is being opened
'''if ns_def.check_file_open(self.inFileTxt_L3_2_2.get()) == True:
return ()'''
# confirm to exist device table and master data file
if os.path.isfile(self.inFileTxt_L3_2_1.get()) == False:
tkinter.messagebox.showerror('Error', 'Could not find the L3 Table file')
Expand All @@ -1194,11 +1185,6 @@ def click_action(self,click_value):
self.inFileTxt_L3_3_1.insert(tk.END, full_filepath)

if click_value == 'L3-3-2' or click_value == 'L3-3-3': # select create from master
### TEST MODE ###
#self.inFileTxt_L3_3_1.delete(0, tkinter.END)
#self.inFileTxt_L3_3_1.insert(tk.END, 'C:/work/Network Sketcher/Network Skecher Ver2.0/[MASTER]Sample figure5.xlsx')
#################

full_filepath = self.inFileTxt_L3_3_1.get()
iDir = os.path.dirname(full_filepath)
basename_without_ext = os.path.splitext(os.path.basename(full_filepath))[0]
Expand Down
8 changes: 4 additions & 4 deletions ns_l1_diagram_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,6 @@ def __init__(self):
clear_section_tuple[1,1] = '<<POSITION_LINE>>'
ns_def.clear_tag_in_position_line(tmp_ws_name, ppt_meta_file, clear_section_tuple)

# adjust for per slide size
self.root_width = self.all_slide_max_width
self.root_hight = self.all_slide_max_hight + 1.0 # top side margin + 1.0

### Create ppt
#self.output_diagram_path = self.outFileTxt_2_1.get()
self.excel_file_path = ppt_meta_file
Expand All @@ -256,6 +252,10 @@ def __init__(self):
if self.all_slide_max_hight < master_root_folder_tuple[2,8] + 1.0: # top side margin + 1.0
self.all_slide_max_hight = master_root_folder_tuple[2, 8] + 1.0 # top side margin + 1.0

# adjust for per slide size
self.root_width = self.all_slide_max_width
self.root_hight = self.all_slide_max_hight + 1.0 # top side margin + 1.0

ns_ddx_figure.ns_ddx_figure_run.__init__(self)
#exit()

Expand Down
8 changes: 4 additions & 4 deletions ns_l3_diagram_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ def l3_area_create(self, target_folder_name, action_type,offset_x ,offset_y):
if len(target_position_shape_array) == 1:
target_position_shape_array.append(['_AIR_9999']) # add dummy shape to second row


### get WP of <<POSITION_FOLDER>>in MASTER EXCEL
wp_exist_array = [[], [], [], []] # up/down/left/right
target_folder_row = 1
Expand Down Expand Up @@ -897,7 +896,7 @@ def process_elements(array):
max_offset_x = now_offset_x

if check_move_to_right(self,top_device_name_array,target_position_shape_array) == True:
left_offset = max_offset_x
left_offset = max_offset_x + self.left_margin # add 1.0 at ver 2.3.4
else:
left_offset = start_l3_seg_inche_x - self.left_margin

Expand Down Expand Up @@ -1979,8 +1978,10 @@ def __init__(self):
max_x_for_y[y] = x

# Add '<END>' to the new_tuple
all_max_y = 1
for y, max_x in max_x_for_y.items():
new_tuple[(y, max_x + 1)] = '<END>'
all_max_y = y

# Find the maximum x value for each y
max_x_per_y = {}
Expand All @@ -1998,7 +1999,7 @@ def __init__(self):

#last input
new_tuple[(1, 1)] = 'All Areas'
new_tuple[(master_y, 1)] = '<END>'
new_tuple[(all_max_y + 1, 1)] = '<END>' #change y axis at ver 2.3.4

# SET new <<POSITION_SHAPE>>
write_to_section = '<<POSITION_SHAPE>>'
Expand All @@ -2007,7 +2008,6 @@ def __init__(self):
ns_def.clear_section_sheet('Master_Data', self.excel_maseter_file_backup, self.position_shape_tuple)
ns_def.write_excel_meta(new_tuple, self.excel_maseter_file_backup, 'Master_Data',write_to_section, offset_row, offset_column)


def calculate_area_offset(self):
#print(self.add_shape_array)
''' get DEVICE_NORMAL'''
Expand Down

0 comments on commit 7dabe65

Please sign in to comment.