Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Excel - skipping blank lines

0 REPLIES 0
Reply
Message 1 of 1
jamjumpin
376 Views, 0 Replies

iLogic Excel - skipping blank lines

Another day and another iLogic problem. 

 

I have an excel table full of stock codes and the angles relevant sizes. 

 

I want a user to input a stock code and inventor will build the angle for you. 

 

I got the following code to work on a dummy sheet, but when I use it on the real thing it doesn't work. 


It seems that if there is a blank row between the column title and the data then Inventor decides that it can't find the value I'm looking for. 

 

Any ideas how to get it to ignore blank cells?

 

I commented out a few things that I don't need just at thie moment to try and make the code simpler.

 

Thank you in advance. 

 

PartNum = iProperties.Value("Custom", "PartNum")
'If PartNum = "" Then
PartNum = InputBox("What part number do you want to insert?", "Part Number?", "")
iProperties.Value("Custom", "PartNum") = PartNum
'End If
H = Height
W = Width
Wa = Wall
Unit = iProperties.Value("Custom", "Unit")
'Mass = iProperties.Value("Physical", "Mass")

i = GoExcel.FindRow("C:\Users\jw\Desktop\Angle.xlsx", "Sheet2", "Item Number", "=", iProperties.Value("Custom", "PartNum"))
Descr = GoExcel.CurrentRowValue("Description")
'Unit = GoExcel.CurrentRowValue("Unit of Measure")
'Mass = GoExcel.CurrentRowValue("lb/in")
Wa = GoExcel.CurrentRowValue("Wall")
W = GoExcel.CurrentRowValue("Width")
H = GoExcel.CurrentRowValue("Height")

Height = H
Width = W
Wall = Wa
iProperties.Value("Project", "Description") = Descr
'iProperties.Value("Custom", "Unit") = Unit
'iProperties.Value("Physical", "Mass") = Mass

iLogicVb.UpdateWhenDone = True

 

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report