Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error in rule

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
GosponZ
349 Views, 2 Replies

Error in rule

ERROR.JPG

I do have in Exel only one column with few Client names, and i have this rule. Guys i need you help to help me understand why this warning is up and after continue  rule is working correct. What i need to fix? Thanks

myXLSX = "C:\Customer.xlsx"

GoExcel.Open(myXLSX)

ForrowNumber = 2 To 1000

If (GoExcel.CellValue("A"&rowNumber) = (""))Then

lastUsedRow = rowNumber- 1

EndIf

Next

'set the list to be read from the XLS file

DimmyArrayListAsNewArrayList

i = 2

'add the values from the Excel file to an array list

DoUntili = lastUsedRow+1

myArrayList.add(GoExcel.CellValue("A"&i))

i = i+ 1

Loop

'present the list to the user

myCust1 = InputListBox("Select Customer from list", myArrayList,myArrayList.Item(0), "iLogic", "Customer")

'set the iProperty

iProperties.Value("Summary", "Company") = myCust1

2 REPLIES 2
Message 2 of 3
rossano_praderi
in reply to: GosponZ

Hi, I've made few modifications to your code and now run without errors.

 

'myXLSX = "C:\Customer.xlsx"
GoExcel.Open("C:\Customer.xlsx", "Sheet1")
lastUsedRow = 2
'set the list to be read from the XLS file
Dim myArrayList As New ArrayList
'add the values from the Excel file to an array list
While GoExcel.CellValue("A" & lastUsedRow) <> ""
		myarraylist.add(GoExcel.CellValue("A" & lastUsedRow))
	lastUsedRow = lastUsedRow + 1
End While

'present the list to the user
myCust1 = InputListBox("Select Customer from list", myArrayList, myArrayList, Title := "iLogic", ListName := "Customer")

'set the iProperty
iProperties.Value("Summary", "Company") = myCust1

 

Bregs

Rossano Praderi



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 3 of 3
GosponZ
in reply to: rossano_praderi

Hi,

thank you and  indeed working well.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report