Ilogic - accsess first embedded excel file

Ilogic - accsess first embedded excel file

Anonymous
Not applicable
379 Views
1 Reply
Message 1 of 2

Ilogic - accsess first embedded excel file

Anonymous
Not applicable

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

0 Likes
380 Views
1 Reply
Reply (1)
Message 2 of 2

MjDeck
Autodesk
Autodesk

@Anonymous , are you still looking for an answer to this question?
You should be able to get the name of the first spreadsheet: get the first ParameterTable item in the ComponentDefinition.Parameters.ParameterTables collection for which the Linked property is false. Get the FileName property from that item.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes