Sub Project_34_ES(ByVal VecType, m, n, m1, n1 As Integer) ' 34_Campo magn. de un dL_ES ' Updated: 11/10/24 ' Created by: A. Becerra (10/10/24) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 34 in the name of this function must match the one in the list of the CONFIG sheet for this project. If not, please correct it. ' Note 2: This code will be integrated into the main code (into the VBA editor) to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet (at the end of column C) and add the number of your new project to the last row in the projects list, and a short name in the corresponding langage column. ' Step 2. Make sure that the list of projects in CONFIG sheet has the correct ascending numbering. ' Step 4. Open the VBA editor (Alt + F11 in Windows or Fn + Option + F11 in macOS). To avoid mistakes, make sure you only have one workbook open. ' Step 5. On the left, in the project explorer, select a non full module (or add a new one). ' Step 6. Select all the code in this file, copy and paste it at the end of the existing code in the module (or in the new one). ' Step 7. To load the project and to check it in a new sheet, go to the CONFIG sheet and click the New Sheet button, then select the project from the list and click the +Vector button. ' Step 8. Click any XYZ button to get the project in the coordinate system. Enjoy it! ' Visit www.sciensolar.com for news and updates of © ScienSolar. Cells(m1 -1, n1 + 2).FormulaR1C1 ="1" Cells(m1 + 0, n1 + 2).FormulaR1C1 ="=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 ="800" Cells(m1 + 0, n1 + 6).FormulaR1C1 ="=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 ="8" Cells(m1 + 0, n1 + 8).FormulaR1C1 ="A. Becerra (10/10/24)" Cells(m1 + 1, n1 + 2).FormulaR1C1 ="=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 ="450" Cells(m1 + 1, n1 + 4).FormulaR1C1 ="=CONFIG!R4C6" Cells(m1 + 1, n1 + 5).FormulaR1C1 ="0" Cells(m1 + 1, n1 + 6).FormulaR1C1 ="=CONFIG!R4C8" Cells(m1 + 1, n1 + 7).FormulaR1C1 ="45" Cells(m1 + 2, n1 + 0).FormulaR1C1 ="t = 0,453125 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 ="=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 ="6000" Cells(m1 + 2, n1 + 4).FormulaR1C1 ="=CONFIG!R5C6" Cells(m1 + 2, n1 + 5).FormulaR1C1 ="15" Cells(m1 + 2, n1 + 6).FormulaR1C1 ="=CONFIG!R5C8" Cells(m1 + 2, n1 + 7).FormulaR1C1 ="45" Cells(m1 + 3, n1 + 0).FormulaR1C1 ="dB" Cells(m1 + 3, n1 + 2).FormulaR1C1 ="=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 ="200" Cells(m1 + 3, n1 + 4).FormulaR1C1 ="=CONFIG!R6C6" Cells(m1 + 3, n1 + 5).FormulaR1C1 ="15" Cells(m1, n1 + 9).FormulaR1C1 = "HELP" Dim HELPtxt as String HELPtxt = "HELP Comment:" & Chr(10) & _ " 1. To create new projects, press the +Vector button without selecting any project in the project list." & Chr(10) & _ " 2. To load an existing project, select a project from the list and then press +Vector" & Chr(10) & _ " 3. To export a new project, press the Get Code button. The code will be saved on your PC in the same directory where this file is located." & Chr(10) & _ " " & Chr(10) & _ " If necessary, use this comment to create your own HELP comment for your project. To do this, simply replace this text with your own (Right Click, Edit Comment) and avoid special characters." & Chr(10) & _ " After pressing Get Code, your comment will be updated and saved in the same txt file as your project and will be uploaded after the project appears in ScienSolar.To include the new project in ScienSolar, perform the following steps:" & Chr(10) & _ " a) Open the txt file where the project was saved; b) copy all the contents of the file and paste it in the VBA Editor of the Excel file ScienSolar; c) add the project name and number to the list on the CONFIG sheet; d) Verify that the number is correlative and that it agrees with the project header number, if not modify it in the header or in the list as necessary." & Chr(10) & _ " Right click to delete or edit this comment." & Chr(10) & _ " " & Chr(10) & _ " For documentation on ScienSolar, please visit www.sciensolar.com. ScienSolar was designed for 3D physics modeling in MS Excel.It is normal that for some projects it takes time to load it in the sheet, it depends on the number of objects in your project and the performance of your PC." On Error Resume Next Cells(m1 , n1 + 9).Comment.Text Text:= HELPtxt If m = m1 + 0 Then ' vector 8 Cells(m + 3, n + -1).FormulaR1C1 ="1" Cells(m + 3, n + 0).FormulaR1C1 ="dB" Cells(m + 3, n + 2).FormulaR1C1 ="=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 ="200" Cells(m + 3, n + 4).FormulaR1C1 ="=CONFIG!R6C6" Cells(m + 3, n + 5).FormulaR1C1 ="15" Cells(m + 3, n + 19).FormulaR1C1 ="1" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 1).FormulaR1C1 ="=IF(R[27]C[4]=0,"""",VLOOKUP(R[27]C[4],R[29]C[1]:R[43]C[4],3))" Cells(m + 4, n + 2).FormulaR1C1 ="Magnetic field of a current loop element" Cells(m + 4, n + 12).FormulaR1C1 ="CAMPO MAGN" & ChrW(201) & "TICO DE UN ELEMENTO DE UNA CORRIENTE CIRCULAR" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="=IF(R[26]C[5]=0,1,""60*1"")" Cells(m + 5, n + 1).FormulaR1C1 ="0" Cells(m + 7, n + -1).FormulaR1C1 ="=R[1]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[1]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[1]C" Cells(m + 8, n + -1).FormulaR1C1 ="0" Cells(m + 8, n + 0).FormulaR1C1 ="0.04" Cells(m + 8, n + 1).FormulaR1C1 ="0.034" Cells(m + 8, n + 2).FormulaR1C1 ="<-- (x, y, z) " Cells(m + 9, n + -1).FormulaR1C1 ="=(R[54]C[1]*R[63]C[2]-R[54]C[2]*R[63]C[1])*R[8]C[1]" Cells(m + 9, n + 0).FormulaR1C1 ="=(-R[54]C[-1]*R[63]C[1]+R[54]C[1]*R[63]C[-1])*R[8]C" Cells(m + 9, n + 1).FormulaR1C1 ="=(R[54]C[-2]*R[63]C[-1]-R[54]C[-1]*R[63]C[-2])*R[8]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 ="<-- (Bx, By, Bz)" Cells(m + 9, n + 4).FormulaR1C1 =" |dB| =" Cells(m + 9, n + 5).FormulaR1C1 ="=SQRT(RC[-6]^2+RC[-5]^2+RC[-4]^2)" Cells(m + 9, n + 21).FormulaR1C1 ="CAMPO MAGN" & ChrW(201) & "TICO DE UNA CORRIENTE" Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 4).FormulaR1C1 ="=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 ="El objetivo de este modelo es comprender la ley de Biot-Savart y calcular el campo magn" & ChrW(233) & "tico dB" Cells(m + 11, n + -1).FormulaR1C1 ="3" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 4).FormulaR1C1 ="=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 ="de un elemento de corriente dL que hace parte de una corriente circular de radio Ro." Cells(m + 3, n + 1).Interior.Color = "255" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "a" Call AddNewVector end if ' vector ends If m = m1 + 9 Then ' vector 7 Cells(m + 3, n + -1).FormulaR1C1 ="2" Cells(m + 3, n + 0).FormulaR1C1 ="a" Cells(m + 3, n + 21).FormulaR1C1 ="El campo magn" & ChrW(233) & "tico dB de un elemento infinitesimal de corriente IdL en cualquier punto del espacio " Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 4).FormulaR1C1 ="PAR" & ChrW(193) & "METROS:" Cells(m + 4, n + 21).FormulaR1C1 ="a una distancia r del elemento de corriente se calcula por la f" & ChrW(243) & "rmula de Biot-Savart:" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="4" Cells(m + 5, n + 1).FormulaR1C1 ="0.3" Cells(m + 5, n + 4).FormulaR1C1 =" I=" Cells(m + 5, n + 5).FormulaR1C1 ="10000" Cells(m + 6, n + 4).FormulaR1C1 =" Ro = " Cells(m + 6, n + 5).FormulaR1C1 ="0.02" Cells(m + 6, n + 27).FormulaR1C1 ="(Eq-28-1)" Cells(m + 7, n + -1).FormulaR1C1 ="=R[3]C[6]" Cells(m + 7, n + 0).FormulaR1C1 ="=R[4]C[5]" Cells(m + 7, n + 1).FormulaR1C1 ="=R[5]C[4]" Cells(m + 7, n + 2).FormulaR1C1 ="<-- O" Cells(m + 7, n + 4).FormulaR1C1 =" K=" Cells(m + 7, n + 5).FormulaR1C1 ="0.0000001" Cells(m + 8, n + -1).FormulaR1C1 ="K=" Cells(m + 8, n + 0).FormulaR1C1 ="=R[-3]C[5]*R[-1]C[5]/POWER(R[55]C[-1]^2+R[55]C^2+R[55]C[1]^2,3/2)" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 ="POSICI" & ChrW(211) & "N" Cells(m + 9, n + -1).FormulaR1C1 ="=R[5]C[6]*COS(RADIANS(R[6]C[6]))*SIN(RADIANS(R[7]C[6]))" Cells(m + 9, n + 0).FormulaR1C1 ="=R[5]C[5]*SIN(RADIANS(R[6]C[5]))*SIN(RADIANS(R[7]C[5]))" Cells(m + 9, n + 1).FormulaR1C1 ="=R[5]C[4]*COS(RADIANS(R[7]C[4]))" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 ="Origen O:" Cells(m + 9, n + 21).FormulaR1C1 ="en donde K es una constante que depende del sistema de unidades. El campo resultante de varios " Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 4).FormulaR1C1 =" x =" Cells(m + 10, n + 5).FormulaR1C1 ="0" Cells(m + 10, n + 21).FormulaR1C1 ="elementos de corriente es la suma vectorial de cada uno de los campos, es decir, para n elementos " Cells(m + 11, n + -1).FormulaR1C1 ="3" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 4).FormulaR1C1 =" y =" Cells(m + 11, n + 5).FormulaR1C1 ="0" Cells(m + 11, n + 21).FormulaR1C1 ="de corriente el campo resultante es " Cells(m + 3, n + 1).Interior.Color = "5855577" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector end if ' vector ends If m = m1 + 18 Then ' vector 6 Call Project_15(15, m, n, m1, n1) Cells(m + 3, n + -1).FormulaR1C1 ="3" Cells(m + 3, n + 4).FormulaR1C1 =" z =" Cells(m + 3, n + 5).FormulaR1C1 ="0" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="186" Cells(m + 4, n + 2).FormulaR1C1 =" DIBUJAR LA ESPIRA:" Cells(m + 4, n + 4).FormulaR1C1 ="Inclinaci" & ChrW(243) & "n:" Cells(m + 4, n + 27).FormulaR1C1 ="(Eq-28-2)" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="0" Cells(m + 5, n + 2).FormulaR1C1 ="|" Cells(m + 5, n + 4).FormulaR1C1 =" r=" Cells(m + 5, n + 5).FormulaR1C1 ="0.02" Cells(m + 6, n + -1).FormulaR1C1 ="Choose the vector to make its graphic:" Cells(m + 6, n + 2).FormulaR1C1 =" 3 (Ejecutar >>)" Cells(m + 6, n + 4).FormulaR1C1 =" phi=" Cells(m + 6, n + 5).FormulaR1C1 ="0" Cells(m + 7, n + 2).FormulaR1C1 ="<< -- 2 (Vec. No. 6)" Cells(m + 7, n + 4).FormulaR1C1 =" theta" Cells(m + 7, n + 5).FormulaR1C1 ="0" Cells(m + 7, n + 21).FormulaR1C1 ="Cuando el n" & ChrW(250) & "mero de elementos tiende a infinito y la longitud de cada uno de ellos tiende a cero, " Cells(m + 8, n + -1).FormulaR1C1 ="Max. steps:" Cells(m + 8, n + 0).FormulaR1C1 ="50" Cells(m + 8, n + 2).FormulaR1C1 ="|" Cells(m + 8, n + 21).FormulaR1C1 ="esta suma se convierte en una integral. En el presente modelo sin embargo se utilizan magnitudes " Cells(m + 9, n + 2).FormulaR1C1 ="<< -- 1 (Presione)" Cells(m + 9, n + 21).FormulaR1C1 ="y cantidades finitas." Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="2" Cells(m + 10, n + 2).FormulaR1C1 ="|" Cells(m + 10, n + 4).FormulaR1C1 ="=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 ="1" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="2" Cells(m + 11, n + 4).FormulaR1C1 ="=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 ="Ingrese las coordenadas del punto de observaci" & ChrW(243) & "n del campo en A11, B11 y C11." Cells(m + 3, n + 1).Interior.Color = "12611584" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector end if ' vector ends If m = m1 + 27 Then ' vector 5 Cells(m + 3, n + -1).FormulaR1C1 ="4" Cells(m + 3, n + 2).FormulaR1C1 ="VISTAS DEL CAMPO:" Cells(m + 3, n + 21).FormulaR1C1 ="Con el bot" & ChrW(243) & "n -> navegue por diferentes elementos de corriente IdL" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 3).FormulaR1C1 ="Inserte 0,1,2,3É->>" Cells(m + 4, n + 5).FormulaR1C1 ="0" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="1" Cells(m + 5, n + 2).FormulaR1C1 ="Valor" Cells(m + 5, n + 3).FormulaR1C1 ="Nombre" Cells(m + 5, n + 4).FormulaR1C1 ="F" & ChrW(243) & "rmula y color" Cells(m + 5, n + 22).FormulaR1C1 ="G17" Cells(m + 5, n + 23).FormulaR1C1 ="Valor de la corriente" Cells(m + 6, n + 2).FormulaR1C1 ="0" Cells(m + 6, n + 6).FormulaR1C1 =" " Cells(m + 6, n + 22).FormulaR1C1 ="G18" Cells(m + 6, n + 23).FormulaR1C1 ="Radio de la espira" Cells(m + 7, n + -1).FormulaR1C1 ="=R[-16]C+R[-18]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-16]C+R[-18]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-16]C+R[-18]C" Cells(m + 7, n + 2).FormulaR1C1 ="1" Cells(m + 7, n + 3).FormulaR1C1 ="Cart." Cells(m + 7, n + 4).FormulaR1C1 ="=""o[0,001665]x=[0;0]o2[0,008]y=[-0,04;0,04]o3[0,008]z=[-0,03;0,04]color=[""&RC[1]&""]origin[cart.]=[0;0;0]tfactor=0,003778176s""" Cells(m + 7, n + 5).FormulaR1C1 ="0.3" Cells(m + 7, n + 6).FormulaR1C1 =" " Cells(m + 7, n + 22).FormulaR1C1 ="G19" Cells(m + 7, n + 23).FormulaR1C1 ="Constante K" Cells(m + 8, n + 2).FormulaR1C1 ="2" Cells(m + 8, n + 3).FormulaR1C1 ="Esf." Cells(m + 8, n + 4).FormulaR1C1 ="=""s[0,007]r=[0;0,025]s2[180]phi=[""&R[26]C[-1]&"";""&R[26]C[-1]+360&""]s3[30]theta=[0;180]color=[""&RC[1]&""]origin[cart.]=[""&R[26]C[-5]&"";""&R[26]C[-4]&"";""&R[26]C[-3]&""]tfactor=0,003895721s""" Cells(m + 8, n + 5).FormulaR1C1 ="0.5" Cells(m + 8, n + 6).FormulaR1C1 =" " Cells(m + 9, n + -1).FormulaR1C1 ="=R[-18]C/SQRT(R[-18]C^2+R[-18]C[1]^2+R[-18]C[2]^2)" Cells(m + 9, n + 0).FormulaR1C1 ="=R[-18]C/SQRT(R[-18]C[-1]^2+R[-18]C^2+R[-18]C[1]^2)" Cells(m + 9, n + 1).FormulaR1C1 ="=R[-18]C/SQRT(R[-18]C[-2]^2+R[-18]C[-1]^2+R[-18]C^2)" Cells(m + 9, n + 2).FormulaR1C1 ="3" Cells(m + 9, n + 3).FormulaR1C1 ="Esf." Cells(m + 9, n + 4).FormulaR1C1 ="=""s[0,00167]r=[0,025;0,025]s2[10]phi=[0;360]s3[10]theta=[90;180]color=[""&RC[1]&""]origin[cart.]=[0;0;0,01]tfactor=0,003895721s""" Cells(m + 9, n + 5).FormulaR1C1 ="0.07" Cells(m + 9, n + 21).FormulaR1C1 ="Los resultados de las componentes dB calculados por la f" & ChrW(243) & "rmula (Eq-28-1) se observa en A12, B12 y C12. " Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 2).FormulaR1C1 ="4" Cells(m + 10, n + 3).FormulaR1C1 ="Cart." Cells(m + 10, n + 4).FormulaR1C1 ="=""o[0,002]x=[-0,04;0,04]o2[0,002]y=[-0,02;0,04]o3[0,008]z=[0;0]color=[""&RC[1]&""]origin[cart.]=[""&R[6]C[-5]&"";""&R[6]C[-4]&"";""&R[6]C[-3]&""]tfactor=0,003778176s""" Cells(m + 10, n + 5).FormulaR1C1 ="0.1" Cells(m + 10, n + 21).FormulaR1C1 ="La magnitud de dB para el elemento dado se calcula en G12." Cells(m + 11, n + -1).FormulaR1C1 ="3" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 2).FormulaR1C1 ="5" Cells(m + 11, n + 3).FormulaR1C1 ="Cart." Cells(m + 11, n + 4).FormulaR1C1 ="=""o[0,001665]x=[0;0]o2[0,008]y=[-0,02;0,04]o3[0,008]z=[-0,03;0,04]color=[""&RC[1]&""]origin[cart.]=[""&R[23]C[-5]&"";""&R[23]C[-4]&"";""&R[23]C[-3]&""]tfactor=0,003778176s""" Cells(m + 11, n + 5).FormulaR1C1 ="1" Cells(m + 11, n + 7).FormulaR1C1 =" " Cells(m + 3, n + 1).Interior.Color = "65280" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "Ro" Call AddNewVector end if ' vector ends If m = m1 + 36 Then ' vector 4 Cells(m + 3, n + -1).FormulaR1C1 ="5" Cells(m + 3, n + 0).FormulaR1C1 ="Ro" Cells(m + 3, n + 2).FormulaR1C1 ="6" Cells(m + 3, n + 3).FormulaR1C1 ="Cil." Cells(m + 3, n + 4).FormulaR1C1 ="=""c[0,006]rho=[0,01;0,03]c2[10]phi=[0;360]c3[0,00666]z=[0,01;0,01]color=[""&RC[1]&""]origin[cart.]=[0;0;0]tfactor=0,003801384s""" Cells(m + 3, n + 5).FormulaR1C1 ="0.9" Cells(m + 3, n + 21).FormulaR1C1 ="Para dibujar la espira completa: Oprimir el bot" & ChrW(243) & "n ResetGraph (ubicado en B30), seleccionar el " Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 2).FormulaR1C1 ="7" Cells(m + 4, n + 3).FormulaR1C1 ="Cil." Cells(m + 4, n + 4).FormulaR1C1 ="=""c[0,006]rho=[0,02;0,02]c2[10]phi=[0;360]c3[0,00666]z=[0,01;0,01]color=[""&RC[1]&""]origin[cart.]=[""&R[-21]C[1]&"";""&R[-20]C[1]&"";""&R[-19]C[1]&""]tfactor=0,003801384s""" Cells(m + 4, n + 5).FormulaR1C1 ="0.1" Cells(m + 4, n + 21).FormulaR1C1 ="vector radio (en la lista ubicada en C28) y oprimir dos veces el bot" & ChrW(243) & "n Ejecutar >> (ubicado en K5)." Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="4" Cells(m + 5, n + 1).FormulaR1C1 ="0.3" Cells(m + 6, n + 21).FormulaR1C1 ="Para ver el vector dB del actual dL en diferentes puntos del espacio, utilizar la celda G34 con valores " Cells(m + 7, n + -1).FormulaR1C1 ="=R[-27]C+R[-25]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-27]C+R[-25]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-27]C+R[-25]C" Cells(m + 7, n + 21).FormulaR1C1 ="del 0 al 7. " Cells(m + 8, n + -1).FormulaR1C1 ="Radio de la espira:" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 ="=R[-30]C[6]*COS(RADIANS(R[-21]C[6]))*COS(RADIANS(R[-20]C[6]))" Cells(m + 9, n + 0).FormulaR1C1 ="=R[-30]C[5]*SIN(RADIANS(R[-21]C[5]))*COS(RADIANS(R[-20]C[5]))" Cells(m + 9, n + 1).FormulaR1C1 ="=-R[-30]C[4]*SIN(RADIANS(R[-20]C[4]))" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 4).FormulaR1C1 ="=IF(R[18]C[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 ="4" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 4).FormulaR1C1 ="=IF(R[17]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "12611584" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector end if ' vector ends If m = m1 + 45 Then ' vector 3 Cells(m + 3, n + -1).FormulaR1C1 ="6" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="0.9" Cells(m + 6, n + -1).FormulaR1C1 ="=SIN(RADIANS(R[-49]C[8]))" Cells(m + 6, n + 0).FormulaR1C1 ="=1-COS(RADIANS(R[-49]C[7]))" Cells(m + 7, n + -1).FormulaR1C1 ="=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-9]C" Cells(m + 8, n + -1).FormulaR1C1 ="Radio rotativo (oculto)" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 ="=R[-9]C+R[-3]C[1]*(R[-18]C[1]*R[-18]C*R[-9]C[1]-R[-18]C[1]*R[-18]C[1]*R[-9]C+R[-18]C[2]*R[-18]C*R[-9]C[2]-R[-18]C[2]*R[-18]C[2]*R[-9]C)+R[-3]C*(R[-18]C[1]*R[-9]C[2]-R[-18]C[2]*R[-9]C[1])" Cells(m + 9, n + 0).FormulaR1C1 ="=R[-9]C+R[-3]C*(-R[-18]C[-1]*R[-18]C[-1]*R[-9]C+R[-18]C[-1]*R[-18]C*R[-9]C[-1]+R[-18]C[1]*R[-18]C*R[-9]C[1]-R[-18]C[1]*R[-18]C[1]*R[-9]C)+R[-3]C[-1]*(-R[-18]C[-1]*R[-9]C[1]+R[-18]C[1]*R[-9]C[-1])" Cells(m + 9, n + 1).FormulaR1C1 ="=R[-9]C+R[-3]C[-1]*(-R[-18]C[-2]*R[-18]C[-2]*R[-9]C+R[-18]C[-2]*R[-18]C*R[-9]C[-2]-R[-18]C[-1]*R[-18]C[-1]*R[-9]C+R[-18]C[-1]*R[-18]C*R[-9]C[-1])+R[-3]C[-2]*(R[-18]C[-2]*R[-9]C[-1]-R[-18]C[-1]*R[-9]C[-2])" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 4).FormulaR1C1 ="=IF(R[18]C[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 ="3" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="2" Cells(m + 11, n + 4).FormulaR1C1 ="=IF(R[17]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "5287936" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "dl" Call AddNewVector end if ' vector ends If m = m1 + 54 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 ="7" Cells(m + 3, n + 0).FormulaR1C1 ="dl" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="0" Cells(m + 6, n + 2).FormulaR1C1 ="r" Cells(m + 6, n + 3).FormulaR1C1 ="phi" Cells(m + 7, n + -1).FormulaR1C1 ="=R[-7]C+R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-7]C+R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-7]C+R[-9]C" Cells(m + 7, n + 2).FormulaR1C1 ="=SQRT(RC[-3]^2+RC[-2]^2+RC[-1]^2)" Cells(m + 7, n + 3).FormulaR1C1 ="=DEGREES(ATAN2(RC[-4],RC[-3]))" Cells(m + 8, n + -1).FormulaR1C1 ="Vector elemento de corriente" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 ="=R[-27]C[1]*R[-9]C[2]-R[-27]C[2]*R[-9]C[1]" Cells(m + 9, n + 0).FormulaR1C1 ="=-R[-27]C[-1]*R[-9]C[1]+R[-27]C[1]*R[-9]C[-1]" Cells(m + 9, n + 1).FormulaR1C1 ="=R[-27]C[-2]*R[-9]C[-1]-R[-27]C[-1]*R[-9]C[-2]" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 4).FormulaR1C1 ="=IF(R[-54]C[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 ="3" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1.5" Cells(m + 11, n + 4).FormulaR1C1 ="=IF(R[-55]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "49407" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "r" Call AddNewVector end if ' vector ends If m = m1 + 63 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 ="8" Cells(m + 3, n + 0).FormulaR1C1 ="r" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="0" Cells(m + 7, n + -1).FormulaR1C1 ="=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-9]C" Cells(m + 8, n + -1).FormulaR1C1 ="Radio del campo B" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 ="=R[-64]C-R[-54]C-R[-18]C" Cells(m + 9, n + 0).FormulaR1C1 ="=R[-64]C-R[-54]C-R[-18]C" Cells(m + 9, n + 1).FormulaR1C1 ="=R[-64]C-R[-54]C-R[-18]C" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 4).FormulaR1C1 ="=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 ="3" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 4).FormulaR1C1 ="=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "11826222" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Cells(m1 + 2, n1 - 1).Value = 8 end if ' vector ends If m = m1 + 63 Then ActiveSheet.DropDowns("List2").Select With Selection ' Do While .ListCount > 0 ' borrar lista .ListIndex = .ListCount .RemoveItem (.ListIndex) Loop i = 3 Do While Cells(m1 + i, n1 - 1) <> "" ' incluir todos los vectores a la lista .AddItem Cells(m1 + i, n1 - 1).Value i = i + 9 Loop End With Sheets("CONFIG").Range("V6").Value = "" Cells(m1 + 9, n1 + 4).Select Call DeleteGraphFunction Call BlackWhiteDesk Call PutEqBut end if ' actualizar hoja End Sub