Ilogic - accsess first embedded excel file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using an embedded excel file to drive model parameters. An external ilogic rule reads a specific "text parameter" and pushes its information to the iprops. My specific problem is that I want to a accsess only the first embedded file in the document. My code (see below) reads only a specific file / number. Can anybody provide me with a more general approach - alway read the first embedded file in the doc?
Many thanks
iPropertyName= GoExcel.CellValue("3rd Party:Embedding 1", "Tabelle1", "A25")
iPropertyValue= GoExcel.CellValue("3rd Party:Embedding 1", "Tabelle1", "B25")
Dim propertyName As String = iPropertyName
Dim propertyValue As String = iPropertyValue
customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
Try
prop = customPropertySet.Item(propertyName)
Catch
' Assume error means not found
customPropertySet.Add("", propertyName)
End Try
iProperties.Value("Custom", propertyName) = propertyValue