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: 

Inventor'2013 with Embedded Excel'2010 spreadsheet problem

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
AERE
2468 Views, 5 Replies

Inventor'2013 with Embedded Excel'2010 spreadsheet problem

Hello everyone,

PLEASE HELP! - this problem drves me crazy. It seems to be trivial but I cannot resolve it.

I created a part ROD.ipt; a cylinder. In it's Parameters table, d0=3 ( stands for diameter) and d1=12 (length). Next, I made Excel spreadsheet (file name: DATA.xlsx) which looks like this:

 

          A                     B

ROD_DIAMETER        3

ROD_LENGTH          12

 

Then, I embedded the DATA.xlsx using "Link" in Parameters table.

iLoic rule to assign parameters (named ASSIGN_PARAMETERS) was created:

 

d0=GoExcel.CellValue ( "3rdParty: Embedding 1", "Sheet1",  "B2" )

d1=GoExcel.CellValue ( "3rdParty: Embedding 1", "Sheet1",  "B3" )

 

After I ran the rule, the following message appears:

 

Error in rule: ASSIGN_PARAMETERS, in document: ROD.ipt

The given path's format is not supported

 

Please take a look at the attached .ipt and .xlsx files. I 'commented all lines in  the ASSIGN_PARAMETERS rule and changed DATA.xlsx to DATA.xls for files to be transferred.

 

Please let me know what I am doing wrong.

Thank you.

 

 

5 REPLIES 5
Message 2 of 6
pcrawley
in reply to: AERE

You've put this in your rule:

d0=GoExcel.CellValue("3rdParty: Embedding 1", "Sheet1", "B1")
d1=GoExcel.CellValue("3rdParty: Embedding 1", "Sheet1", "B2")

 

But it should read:

d0=GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "B1")
d1=GoExcel.CellValue("3rd Party:Embedding 1", "Sheet1", "B2")

 

The difference is the space after "3rd" and the space before "Embedding"

 

Subtle - but critical 🙂  That's all it was.

 

Don't forget you can put sensible parameter names in Inventor - you'll get lost pretty quickly if you keep using d0, d1, d2 etc.

Peter
Message 3 of 6
AERE
in reply to: pcrawley

Good Evening pcrawley,
Thank you so much - that all it was!  - Such problem wouldn't be a problem from now on.
Could you please suggest any technique to make my part updating automatically as soon as I click the "save" button in Excel? - I would really appreciate your help.

Message 4 of 6
pcrawley
in reply to: AERE

Glad I could help!  (Feel free to mark the response as a solution and give Kudos!!)

 

Since your spread sheet is embedded, the link should be "live" - ie Change the parameter in Excel and the model will update as you type.  However, after embedding the spread sheet, a common mistake is to think that you should be editing the .XLSX file to change your parameters.  You don't.  Delete the .XLSX file - it is no longer needed.

 

If you have embedded the spreadsheet, you'll see it is available under the "3rd Party" folder at the top of your model browser.  Expand it and double-click the "Embedded1" (or whatever it's now called) to edit the spreadsheet.  You should find the updates are immediate.  Be careful with this though - if your model starts getting big and you have a lot of parameters, your performance can bog down.  If you are heading towards bigger models, I strongly advise you get into skeletal modelling and passing parameters between parts that way rather than embedded spread sheets.

 

If it doesn't update dynamically, check:

 

1. Check this setting in your parameters dialogue box:

2.jpg

 

2.  Check this in your iLogic Rules Editor:

1.jpg

 

Peter

Peter
Message 5 of 6
AERE
in reply to: pcrawley

Thank you Peter,

I have everything you mentioned checked... the Parameters table updates immediately; regardless, the part is "waiting" for the rule to be ran again, before it changes shape visibly. To the rule, I added following:

 

InventorVb.DocumentUpdate(True)

 

and also listed the rule in all Event Triggers. Yet, after the spreadsheet values are changed and the Excel file is saved, once again - part is not changing unless the rule is ran; which doesn't happen automatically.

If  you think it could be a way to fix it, please let me know.

Thank you again Peter.

Message 6 of 6
pcrawley
in reply to: AERE

Oops - my mistake.  It works dynamically when you write data from Inventor to Excel, not the other way round sorry.

Peter

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

Post to forums  

Autodesk Design & Make Report