Browse Source

Correccion de errores

dacowars 1 month ago
parent
commit
87178d29c0
1 changed files with 13 additions and 10 deletions
  1. 13 10
      Comb_acciones.py

+ 13 - 10
Comb_acciones.py

@@ -675,13 +675,16 @@ def main(ruta_excel, norma_proyecto, vias_cargadas):
     temp_comboNames = SapModel.RespCombo.GetNameList()
     for combo_type in ["ELU_P", "ELU_ACC", "ELU_SIS", "ELS_C_", "ELS_F_", "ELS_CP"]:
         total_envolventes += sum(1 for idx in range(temp_comboNames[0]) if combo_type in temp_comboNames[1][idx])
-    acum = crear_combo_envolvente("1. ENV ELU P", "ELU_P", total_envolventes, 0)
-    acum += crear_combo_envolvente("2. ENV ELU ACC", "ELU_ACC", total_envolventes, acum)
-    acum += crear_combo_envolvente("3. ENV ELU SIS", "ELU_SIS", total_envolventes, acum)
-    acum += crear_combo_envolvente("4. ENV ELS C", "ELS_C", total_envolventes, acum)
-    acum += crear_combo_envolvente("5. ENV ELS F", "ELS_F", total_envolventes, acum)
-    _ = crear_combo_envolvente("6. ENV ELS CP", "ELS_CP", total_envolventes, acum)
-    
+    acum = crear_combo_envolvente("1. ENV ELU P", "ELU_P_", total_envolventes, 0)
+    acum += crear_combo_envolvente("2. ENV ELU ACC", "ELU_ACC_", total_envolventes, acum)
+    acum += crear_combo_envolvente("3. ENV ELU SIS", "ELU_SIS_", total_envolventes, acum)
+    acum += crear_combo_envolvente("4. ENV ELS C", "ELS_C_", total_envolventes, acum)
+    acum += crear_combo_envolvente("5. ENV ELS F", "ELS_F_", total_envolventes, acum)
+    _ = crear_combo_envolvente("6. ENV ELS CP", "ELS_CP_", total_envolventes, acum)
+    ret = SapModel.RespCombo.Add("7. ENV ELU TODO", 1)
+    ret = SapModel.RespCombo.SetCaseList("7. ENV ELU TODO", 1, "1. ENV ELU P", 1)
+    if ("2. ENV ELU ACC" in temp_comboNames): ret = SapModel.RespCombo.SetCaseList("7. ENV ELU TODO", 1, "2. ENV ELU ACC", 1)
+    if ("3. ENV ELU SIS" in temp_comboNames): ret = SapModel.RespCombo.SetCaseList("7. ENV ELU TODO", 1, "3. ENV ELU SIS", 1)
 
 def crear_ventana_configuracion():
     """Crea una ventana gráfica para configuración inicial"""
@@ -780,7 +783,7 @@ def crear_ventana_configuracion():
     frame_flechas.pack(anchor=tk.CENTER, padx=20, pady=10)
     var_flechas = tk.StringVar(value="1. ENV ELU P")
     combo_flechas = tk.ttk.Combobox(frame_flechas, textvariable=var_flechas,
-                                    values=["1. ENV ELU P", "2. ENV ELU ACC", "3. ENV ELU SIS", "4. ENV ELS C", "5. ENV ELS F", "6. ENV ELS CP"], 
+                                    values=["1. ENV ELU P", "2. ENV ELU ACC", "3. ENV ELU SIS", "4. ENV ELS C", "5. ENV ELS F", "6. ENV ELS CP", "7. ENV ELU TODO"], 
                                     state="readonly", width=15)
     combo_flechas.pack(side=tk.RIGHT, padx=5)
 
@@ -791,14 +794,14 @@ def crear_ventana_configuracion():
 
     # Boton extraer esfuerzos
     def on_esfuerzos():
-        extraer_esfuerzos(SapModel, var_excel.get(), var_flechas.get())
+        extraer_esfuerzos(SapModel, var_excel.get(), var_esfuerzos.get())
 
     # Frame para esfuerzos
     frame_esfuerzos = tk.Frame(ventana)
     frame_esfuerzos.pack(anchor=tk.CENTER, padx=20, pady=10)
     var_esfuerzos = tk.StringVar(value="1. ENV ELU P")
     combo_esfuerzos = tk.ttk.Combobox(frame_esfuerzos, textvariable=var_esfuerzos,
-                                    values=["1. ENV ELU P", "2. ENV ELU ACC", "3. ENV ELU SIS", "4. ENV ELS C", "5. ENV ELS F", "6. ENV ELS CP"], 
+                                    values=["1. ENV ELU P", "2. ENV ELU ACC", "3. ENV ELU SIS", "4. ENV ELS C", "5. ENV ELS F", "6. ENV ELS CP", "7. ENV ELU TODO"], 
                                     state="readonly", width=15)
     combo_esfuerzos.pack(side=tk.RIGHT, padx=5)
     boton_esfuerzos = tk.Button(ventana, text="Extraer esfuerzos", command=on_esfuerzos, font=("Arial", 11), bg="#2196F3", fg="white", padx=10, pady=5)