idea-statica / iom-examples

Examples of using IDEA StatiCa IOM API
MIT License
8 stars 4 forks source link

[QUESTION] Updating ConnectionData / Template of existing file and rerunning analysis #84

Closed BouwenmetStaal closed 3 years ago

BouwenmetStaal commented 3 years ago

After calculating the IDEA StatiCa connection file, I want to change attributes of the connection (for example change the size of a weld) and redo the calculation.

What method would be best to do this? I thought of the following methods, unfortunately both are incomplete in order to fully execute this desired procedure.

Method 1 (Modifying ConnectionData): 1)conRes = client.Calculate(connection.Identifier); 2)ConnectionData cd = client.GetConnectionModel(connection.Identifier); 3)foreach (WeldData w in cd.Welds) { w.Thickness = 0.020; } 4)Method missing to update new ConnectionData to client.

Method 2 (using ConnectionTemplate): 1)conRes = client.Calculate(connection.Identifier); 2)client.ExportToTemplate(connection.Identifier, templatePath); 4)ConnectionTemplate class missing to open, modify and save new template xml 5)client.ApplyTemplate(connection.Identifier, newTemplatePath, null);

mpospisil commented 3 years ago

we added new method IConnHiddenCheck.DeleteAllOperations(string connectionId)

see :

https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaStatiCa.Plugin/IConnHiddenCheck.cs

the source code was mograted to the new repository https://github.com/idea-statica/ideastatica-public

you can test it with the beta beta version

https://jurajsabatkaideastatica-my.sharepoint.com/:u:/g/personal/martin_pospisil_ideastatica_com/EUtNmzCflPdLn3WRNwh5ng4BtCJGAH-iGn1ih4Xb7Rf_yw?e=ypBAJy

officially it will be released in the patch 21.0.2

RayaanABT commented 3 years ago

Hi Martin,

This new method to delete all operations does not solve the issue I described.

Could the missing step of one of the two described methods be added as functionality to the IOM. This addition will enable the possibility to create optimization algorithms with the IOM.

BR, Rayaan