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: 

Need help to use embedding spreadsheet in iLogic

7 REPLIES 7
Reply
Message 1 of 8
zdhrichard
1979 Views, 7 Replies

Need help to use embedding spreadsheet in iLogic

For some reason, I want to use embeded excel sheet in part, and I will use ilogic rule to control my block (Size, and lot of other parameters).

But when I run the rule, it give me following error.

GoExcel:3rd Party worksheet not found: "3rd Party: CodeTable",Sheet:"Sheet1"

 

Could somebody please tell me what mistake I made? Please see atatched model.

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
7 REPLIES 7
Message 2 of 8
pcrawley
in reply to: zdhrichard

It's the "CodeTable" bit in 3rd Party: CodeTable",Sheet:"Sheet1

 

Change it back to Embedding

 

The rest of the syntax looks a bit suspect too...

 

Try:  GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "A2")

 

So your code should read:

 

         x = GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "A2") 'To read from the sheet

 

Or 

 

         GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "A2") = x 'To write to the sheet

 

Where the only bits you should change are "Sheet1" which is the sheet name in the embedded file, and "A2" is the cell for the data you are reading/writing.

 

I've noticed that regardless of the name of the original spreadsheet - or the name you give it in the Inventor Browser - iLogic always refers to it as "Embedding1".  If you delete the embedded sheet and embed a new one, it becomes "Embedding2".

 

EDIT:  I just realise you posted the error message - not the code.  That's why I thought the syntax was wrong.  My mistake - sorry.

 

Peter
Message 3 of 8
zdhrichard
in reply to: pcrawley

Thanks lot for your reply, Peter.

Unfortunately, even I make a brand new one and put the code as you wrote, it still give me the error.

 

GoExcel: 3rd Party worksheet not found: "3rd Party:Embedding 1", Sheet: "Sheet1"

 

And what I need to do is:

If my "FlangePortCode" is changed as from "1L" to "2M", I need my block size to be changed at same time.

I have almost more than 20 parameters need to be change for each "FlangePortCode" change in my actual model.

 

Any other advise to make it work?

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Message 4 of 8
pcrawley
in reply to: zdhrichard

Try this.  Open the attached part file, expand the 3rd Party folder in the browser, right-click and edit the spreadsheet (Embedding1).

 

If you edit the rule and have a look at the code, it shoud say:

    'This writes a value to the spreadsheet cell A2
   GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "A2") = "This came from Inventor!"

   'This reads a value from the spreadsheet cell C4
   valueFromExcel = GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "C4")

   'This displays whatever was in C4 in a messagebox
   MessageBox.Show(valueFromExcel, "iLogic")

 

Make sure you have the spreadsheet open and visible - then run the code.  You should see some text appear in cell A2, and a message box appear in Inventor.

 

Hope this helps.

Peter
Message 5 of 8
zdhrichard
in reply to: pcrawley

Thanks.

Your ExcelTest.ipt is working in my computer even I added "GoExcel.FindRow", but "GoExcel.CurrentRowValue" does not work which comes from a tutorial file. I could use "GoExcel.CellValue" to solve this issue.

 

But the problem is: I need create a new *.ipt file. No matter how I insert the excel object (Create New or Creat from File, and I tries all type format as following, it gave me some error message:

 

GoExcel: 3rd Party worksheet not found: "3rd Party:Embedding 1", Sheet: "Sheet1"

 

Please see attached MyTest.ipt

 

Capture.PNG

 

My Excel software is Part of Microsoft Office Home and Business 2010, Version: 14.0.7106.5003 (64 bit).

 

Any ideas to solve this issue in order I could create my *.ipt file?

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Message 6 of 8
zdhrichard
in reply to: pcrawley

And Peter,

I noticed you discussed with somebody on 09-03-2013 for using excel. You recommended

GoExcel.FIndRow

and

GoExcel.CurrentRowValue

Do you know what the reason is I cannot use "GoExcel.CurrentRowValue" function? Even I put it inot your *.ipt file, it does not work.

 

And I still need to find out what is the reason after I inserted Excel spreadsheet into my *.ipt, the function cannot find the sheet issue as I mentioned in my previous post.

 

I am sorry, I cannot atatched my files because restriction of our server. I will try to put it from home this evening.

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Message 7 of 8
zdhrichard
in reply to: pcrawley

Just found the problem.

Inventor cannot find the worksheet if using Insert Object, this issue have been happened from 2011 Version or more older. Do not know why Autodesk still not solve this issue. Even in torturial, "Insert Object" is still introduced even it does not work. We need to use Link (check "embed") under Parameters. And the Line 1 of the worksheet cannot be same as your current parameters.

Rest, all of my code works fine.

 

Anyway, thanks lot for yor help.

Rich

Autodesk Inventor Professional 2018 (64 Bit Edition)
Build: 284, Release 2018.3
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Message 8 of 8

SO HELPFUL!!! Looked for hours to figure out why the embedding wasn't working.

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

Post to forums  

Autodesk Design & Make Report