iLogic Write to Excel

iLogic Write to Excel

layochim
Enthusiast Enthusiast
174 Views
7 Replies
Message 1 of 8

iLogic Write to Excel

layochim
Enthusiast
Enthusiast

Is there a good way to pull parameters from an IAM to drop into Cells within an Excel Spreadsheet and pull from that same spreadsheet, values to be sent back into Inventor?

0 Likes
Accepted solutions (1)
175 Views
7 Replies
Replies (7)
Message 2 of 8

WCrihfield
Mentor
Mentor
Accepted solution

Yes, sort of.  Which 'way' would be best for accomplishing something like that depends on all the little details of the task, which you have not mentioned yet.  There are so many questions that could be asked here that is difficult to know where to start, because this may be a relatively simple task, or it may be a very complex task, depending on the details, and exactly how you want everything to work, and exactly how you want to specify which ones, coming from which source, should be going to which exact destination, and when, and how the whole process should be initiated.  If any pop-up prompts or dialogs would be needed, or if certain custom information would need to be 'hard-coded' into the code, verses using manual interactions, and so on.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 8

layochim
Enthusiast
Enthusiast

Currently I've figured out how to populate cells in an excel using iLogic.  Once this happens Excel generates a value from those and that value is what I'm trying to push back into inventor.  This is for a costing spreadsheet, if that helps.

0 Likes
Message 4 of 8

layochim
Enthusiast
Enthusiast

Please disregard, i've figured it out!  Thanks.

0 Likes
Message 5 of 8

C_Haines_ENG
Collaborator
Collaborator

Out of curiosity, which method did you end up using?

0 Likes
Message 6 of 8

layochim
Enthusiast
Enthusiast

Below is the code I put together, very basic and elementary code, I'm new to iLogic.  After modifying a parameter and running the code, I receive a RunTime error.  Which I've attached.

Turns out, I don't need to do any iLogic with Inventor, this was intended for another software which can read directly from Excel.

 

 

Sub Pricing()

xlsPath = "C:\Users\Lyle\OneDrive - SCR Solutions\Documents\ConfiguratorPricing.xlsx"

GoExcel.CellValue(xlsPath, "Costing", "B10") = BELTLENGTH
GoExcel.CellValue(xlsPath, "Costing", "B11") = TOB
GoExcel.CellValue(xlsPath, "Costing", "B12") = TOB
GoExcel.CellValue(xlsPath, "Costing", "B9") = BeltWidth
Total_Cost = GoExcel.CellValue(xlsPath, "Costing", "B6")

GoExcel.Save

GoExcel.DisplayAlerts = False
End Sub

 

layochim_1-1750422656225.png

 

0 Likes
Message 7 of 8

C_Haines_ENG
Collaborator
Collaborator

Well if you ever want to fix the Runtime error, let me know.

0 Likes
Message 8 of 8

layochim
Enthusiast
Enthusiast

That'd be great! I'd like to get this fixed just so I've got something to use on the side and for future projects.

0 Likes