Message 1 of 2
create part and drawing file from two excel

Not applicable
02-29-2016
04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, anyone can help e with this ilogic code.
I have two excel files. Nozzles.xlsx and WNFLG2.xlsx.
Nozzles.elsx are output of the another software and are Nozzle.
i want to choose the row nozzle according to the selective column to create their part file and finally their idw file....
it is my codes to create their part files but it did not work right
'For J=3 To 5 GoExcel.Open("C:\Users\a.khakbaz\Desktop\nozzle\Nozzles", "Sheet1") i = GoExcel.FindRow("C:\Users\a.khakbaz\Desktop\nozzle\Nozzles", "Sheet1","flangeType", "=", 0, "class","=",150,"RadialNozzle", "=", True ) N_ID= GoExcel.CurrentRowValue("nominalDiameter") 'If GoExcel.CellValue("H" & J)= 150 & GoExcel.CellValue("AQ" & J)= 0 & GoExcel.CellValue("AW" & J)= "TRUE" Then'N_ID= GoExcel.CellValue("E" & J)'End If Dim sFilePath As String= ThisDoc.Path & "\" ThisDoc.Save doc = ThisDoc.Document sNewName=GoExcel.CellValue("B" & i) GoExcel.Close GoExcel.Open("C:\Users\a.khakbaz\Desktop\nozzle\WNFLG2", "Sheet1") i = GoExcel.FindRow("C:\Users\a.khakbaz\Desktop\nozzle\WNFLG2", "Sheet1","NPS","=",N_ID) iLogicVb.UpdateWhenDone = True O = GoExcel.CurrentRowValue("O") C1 = GoExcel.CurrentRowValue("C") CB = GoExcel.CurrentRowValue("CB") CC= GoExcel.CurrentRowValue("CC") R = GoExcel.CurrentRowValue("R") No = GoExcel.CurrentRowValue("No") G = GoExcel.CurrentRowValue("G") D = GoExcel.CurrentRowValue("D") X = GoExcel.CurrentRowValue("X") A1 = GoExcel.CurrentRowValue("A") Y1 = GoExcel.CurrentRowValue("Y1") YY = GoExcel.CurrentRowValue("YY") RA = GoExcel.CurrentRowValue("RA") RuleParametersOutput() GoExcel.Close ThisDoc.Document.Update() ThisDoc.Document.saveas(sFilePath & sNewName & ".ipt",True) 'Next J'End If