Message 1 of 4
[BUG REPORT] Error setting model state table cell to empty string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
New post from this thread: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/clearing-unsetting-textual-custom-ip...
It happens in Inventor 2023.2 and 2022.4.
How to reproduce the issue:
- Open new part
- create a model state
- create a custom iProperty named testprop in Model State1
- activate primary model state
- edit the testprop to another value (now the column of that property is in the excel table)
- Run the attached rule that set to an empty string the testprop for Model State1 via modelstatetable object: you get an error.
The rule:
Dim propName As String = "testprop" Dim propTblHeader As String = "Custom" Dim msName As String = "Model State1" Dim propVal As String = "" Dim facDoc As Document = ThisApplication.ActiveDocument Dim msTbl As ModelStateTable = facDoc.ComponentDefinition.ModelStates.ModelStateTable Dim tblClms As ModelStateTableColumns = msTbl.TableColumns Dim thisClm As ModelStateTableColumn = tblClms.Item(propName & " [" & propTblHeader & "]") Dim thisCell As ModelStateTableCell = thisClm.Item(msName) thisCell.Value = propValue