- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found a snippet of iLogic code that allows me to update the Excel table of an iPart or iAssembly, and I've linked to the source below. This bit of code works great, except that iLogic is unable to update the model based on the active row of the table. This is a problem, as since I am replacing all values in a column, that would include the active row as well.
For i = 2 to oFactory.TableRows.Count + 1
oCells.Item(i, 3) = "Text to replace"
Next
If I run the code, the active row will not change, but if I open the Excel table, I will get the message:
"The values in the Active Row of the table do not match the document's current values. Do you wish to update the table before continuing?"
To which I must answer "no". Then the table will open. If I then save and close the table, I will get the message:
"The values in the document do not match the Active Row of the Table. Do you wish to update the document before continuing?"
To which I must answer "yes" to finally update the model.
This is far more tedious than I would like. To my knowledge, these prompts cannot be bypassed even though I ALWAYS want to update the model from the table. This wouldn't be too much of a problem, except I must run this for multiple documents at once, and these tables are enormous and take a long time for each change to take affect. Therefore, this table change must be entirely automated.
So my question is if anyone knows how to force the model to be updated from the iPart/iAssembly table or a workaround that would achieve the same effect. For example, I know I can change all rows excluding the active row, then change active row to a different row, then edit the table for what was previously the active row, but I have not been able to achieve this in an iLogic script, and the function "iPart.ChangeRow" does not work for multiple open documents.
Solved! Go to Solution.