Hi.
Have been searching for a solution but not found one.
Is there a way to link a specific cell in an excel spreadsheet to a Text in an Inventor Drawing using iLogic?
I have on my Drawing some Textfields that i want to drive from an excel spreadsheet.
Textfields on my Drawing. Excel Spreadsheet.
I want the Value from column B to be inserted into the drawing Textfields.
Found this from Curtis W, and its something like this im after.
http://inventortrenches.blogspot.se/2014/06/ilogic-titleblock-project-data-from.html
Using Inventor 2015
//Jesper
Solved! Go to Solution.
Solved by Owner2229. Go to Solution.
I believe the only way is like how Curtis accomplished it; have an iLogic routine that pushes values into prompted entry textboxes.
Hi, why does it need to be linked to Excel? Are you using this Excel table for something else or do you want to use it for more than one drawing?
My point is, that you can have these textfields in your template and fill them with a form. I have button added to ribbon so it is easy to use.
Hi.
My customer want to use Excel. They link it to another application also so i kind of have to use Excel.
There is no way to link the cells to a Custom iProperty in the drawing? Then i can link the Textfield to that property.
I started to use a form but my customer said no.
Hi, you have to think witch trigger to use for it (new document, before save etc.), but I think that you can use one of these rules below (you have to modify it for your needs ofc.).
If you already have the iProperties in place than you can use this:
GoExcel.Open("C:\myfolder\myexceltable.xlsx", "Sheet1") iProperties.Value("Custom", "Text 1") = GoExcel.CellValue("B2")
iProperties.Value("Custom", "Text 2") = GoExcel.CellValue("B3")
...
GoExcel.Close
If you want the iProperty names to be taken from the excel table than you can use this one:
GoExcel.Open("C:\myfolder\myexceltable.xlsx", "Sheet1")
Dim oName As String = GoExcel.CellValue("A2")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B2")
oName = GoExcel.CellValue("A3")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B3")
...
GoExcel.Close
Or if you have a lot of text cells than you can use this one to automate the procces. It will find all filled cells in all rows up to infinity.
GoExcel.Open("C:\myfolder\myexceltable.xlsx", "Sheet1")
RowStart = 2
RowEnd = 100 For countA = RowStart To (RowEnd * 0.01) + RowStart If Not String.IsNullOrEmpty(GoExcel.CellValue("A" & RowEnd)) Then RowEnd = RowEnd + 100 Else Exit For End If Next For rowPN = RowStart To RowEnd If String.IsNullOrEmpty(GoExcel.CellValue("A" & RowPN)) Then rowN = rowPN - 1 Exit For End If Next For oRow = RowStart To RowN
Dim oName As String = GoExcel.CellValue("A" & oRow)
iProperties.Value("Custom", oName) = GoExcel.CellValue("B" & oRow)
Next
GoExcel.Close
Just remember, that the last rule will stop on first empty row it will find.