create part and drawing file from two excel

create part and drawing file from two excel

Anonymous
Not applicable
396 Views
1 Reply
Message 1 of 2

create part and drawing file from two excel

Anonymous
Not applicable

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....

Capture2.PNG

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
0 Likes
397 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

in the previous post A.ipt is my file which contain two active rules, rule 0 and rule 7

it has some parameter like O, CB and etc which are readen from WNFLG2.xlsx

it's the picture of A1.ipt file

Capture3.PNG 

0 Likes