09-17-2019
02:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-17-2019
02:03 AM
Try below changes in iLogic code.
ThisApplication.SilentOperation = True
'GoExcel.Open("M:\0700 Engineering\0770 DOCUMENTS\Excel Files\Belt Data.xlsx", "Belt_Data")
'Set Belt Series Multi-value list
MultiValue.List("BSeries") = GoExcel.CellValues("C:\Users\t_gc\Downloads\Belt Data.xlsx", "Belt_Data", "B4", "b147")
'Series = Parameter("BSeries")
rangeArray = GoExcel.NamedRangeValue("BS_" & BSeries)
'define and set Series Style list based on Belt Series
Dim oList As New ArrayList
'Check if rangeArray is an array or a Single Row
If IsArray(rangeArray)
'Count the number of rows in array
Dim oRowCount As Integer
oRowCount = rangeArray.GetLength(0)
'Populate arraylist
Dim oRowIndex As Integer
For oRowIndex = 1 To oRowCount
oList.Add(rangeArray(oRowIndex, 1))
Next
'Populate MultiValue Parameter
MultiValue.List("BStyle") = oList
Else
Series_val = Parameter("BSeries")
' Style_Val = Parameter("BStyle")
GoExcel.TitleRow = 3
i = GoExcel.FindRow("C:\Users\t_gc\Downloads\Belt Data.xlsx", "Belt_Data", "SERIES", "=", Series_val)
b = GoExcel.CurrentRowValue("SERIES")
MessageBox.Show(b)
'Parameter("BStyle")=goExcel.CurrentRowValue("STYLE")
End If
'GoExcel.Open("M:\0700 Engineering\0770 DOCUMENTS\Excel Files\Belt Data.xlsx", "Sprocket_Data")
'Set Spr_PD Multi-value list
PD= Parameter("Spr_PD")
SP_rangeArray = GoExcel.NamedRangeValue("SP_" & Parameter("BSeries"))
'define and set Sprocket PD list based on Belt Series
Dim sList As New ArrayList
'Count the number of rows in array
Dim sRowCount As Integer
sRowCount = SP_rangeArray.GetLength(0)
'Populate arraylist
Dim sRowIndex As Integer
For sRowIndex = 1 To sRowCount
sList.Add(SP_rangeArray(sRowIndex, 1))
Next
'Populate MultiValue Parameter
MultiValue.List("Spr_PD") = sList
Call GoExcel.Close ()
iLogicVb.UpdateWhenDone = True
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
