I am getting an error with the code "Unable to cast object of type 'System.String' to type 'System.Object[,]'. - This is happening at the sWriteCell lines. I was able to trouble shoot all the way to the end but cannot get these lines of code to export the Properties. Any help would be great. Here is the expanded error message System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Object[,]'. at Autodesk.iLogic.Core.ExcelInterface.LibXLRange.ConvertToObjectArray(Object o) at Autodesk.iLogic.Core.ExcelInterface.LibXLRange.set_Value2(Object value) at iLogic.GoExcel.set_CurrentCellValue(String cellAddress, Object value) at ThisRule.QueryBOMRowProperties(BOMRowsEnumerator oBOMRows, String JobSpreadsheetName, Int32 iCurrRow) in external rule: ExportBOM:line 120 at ThisRule.Main() in external rule: ExportBOM:line 60 at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem) at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
@imaginittech2 ай бұрын
This video is from 2020 and there’ve been significant changes to Inventor since then. Our experts noted that without seeing what you have written, they can only guess at what is happening. It’s possible you aren’t passing a string value to the GoExcel.CellValue lines. Those lines are expecting a string and the error mentioned states you’re passing an Object. Anything more in-depth than that would likely require a consult with support, you’re welcome to reach out to learn more about our support options on the website www.imaginit.com.
@jackrax65962 жыл бұрын
I,be try your code. But I have error , it said "Object references not set to an instance of an object" . How to fix this?
@imaginittech2 жыл бұрын
Thanks for reaching out. After checking with our experts, they noted that this is not something they can help without knowing more. If you want to reach out to us to see about getting someone to review your code more in-depth, please use the Contact Us form on our website www.imaginit.com