- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
VBA Excel Error
Hello,
Please find attached screen shot while I run the I-logic in inventor also Excel will link with illogic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
'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")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
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