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: 

VBA Excel Error

8 REPLIES 8
Reply
Message 1 of 9
karram
595 Views, 8 Replies

VBA Excel Error

Hello,

 

Please find attached screen shot while I run the I-logic in inventor also Excel will link with illogic.

 

8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: karram

Can you share your code please?

Message 3 of 9
karram
in reply to: Anonymous

Hello!

 

The code is very huge i think, its not able to share, because i create the ilogic rule in different parameter.

Mainly the excel only creates the error. Is there any reference missing or i use latest Windows 10 and Excel 2017.

Also i install two excel 2010 & 2017.

 

Could you please clarify?

Message 4 of 9
Anonymous
in reply to: karram

I don't understand, are you using iLogic to read/write to excel or are you trying to run a VBA macro inside excel?

 

Can you at least share the section of code that creates the connection to excel?

Message 5 of 9
karram
in reply to: Anonymous

Iam using read / write excel to excel using ilogic

Message 6 of 9
karram
in reply to: Anonymous

'setting ExcelFile to be the one that exists in the workspace
ExcelFile =ThisDoc.WorkspacePath & "\" & "Nozzle_table.xls"

'finding the row number according to custom property: "Nozzle_ID"
GoExcel.FindRow(ExcelFile, "Nozzle_table","NOZZLE", "=", iProperties.Value("Custom", "Nozzle_ID"))

'getting the values for the nozzle list
iProperties.Value("Custom", "Nozzle_DESCR") = GoExcel.CurrentRowValue("DESCRIPTION")
iProperties.Value("Custom", "Nozzle_CODE") = GoExcel.CurrentRowValue("CODE")
iProperties.Value("Custom", "Nozzle_TYPE") = GoExcel.CurrentRowValue("NOZZLE TYPE")
iProperties.Value("Custom", "Nozzle_SIZE") = GoExcel.CurrentRowValue("LIST SIZE") 
iProperties.Value("Custom", "Nozzle_RATING") = GoExcel.CurrentRowValue("LIST RATING")
iProperties.Value("Custom", "Nozzle_COMMENT") = GoExcel.CurrentRowValue("COMMENT")

'getting the values for the nozzle dimensions and placing
Diameter_Excel=GoExcel.CurrentRowValue("SIZE (ACT.)")
Connection_thickness = GoExcel.CurrentRowValue("THICKNESS")
Dist_FR_XYplane_Excel = GoExcel.CurrentRowValue("DIST. FR. XY-PLANE")
Dist1_FR_Zaxis_Excel = GoExcel.CurrentRowValue("DIST1. FR. Z-AXIS")
Dist2_FR_Zaxis_Excel = GoExcel.CurrentRowValue("DIST2. FR. Z-AXIS")
Course_Excel = GoExcel.CurrentRowValue("COURSE") 
Direction_Excel=GoExcel.CurrentRowValue("DIRECTION")

iLogicVb.UpdateWhenDone = True

iLogicVb.RunRule("Nozzle balloon")










Message 7 of 9
Anonymous
in reply to: karram

Have you debugged to identify which line is generating the error?

Message 8 of 9
karram
in reply to: Anonymous

if I run the whole rule this kind of error appears.

Also it not shows the exact line in this rule. This shows generally like this unhandled error

Message 9 of 9
MechMachineMan
in reply to: karram

By inputting a message box and moving it down line by line and running code, you can manually debug to see the line of the error (see my signature for a link explaining this better)

 

Also, I think you issue COULD be the fact you are using a ".xls" instead of an ".xlsx".


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report