Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Aidarhanovn
95 Views, 0 Replies

error when switching iAssemblyTableRows to c# application

Hi all
I am writing an application in Visual Studio in C#.
An error occurs when trying to modify iAssembly.
At the same time, a similar code in VBA works without errors.

Please tell me if anyone has come across this error? Maybe someone has a solution for this issue.

 

iAssemblyFactory assemblyFactory = assemblyComponentDefinition.iAssemblyFactory;
                iAssemblyTableRow defaultRow = assemblyFactory.DefaultRow;
                iAssemblyTableRows tableRows = assemblyFactory.TableRows;
                foreach (iAssemblyTableRow tableRow in tableRows)
                {
                    assemblyFactory.DefaultRow = tableRow; //ERROR
                }
                assemblyFactory.DefaultRow = defaultRow;