Hello everyone!
Few of my c# blocks stopped working randomly. They worked before, but when i came back to work, multiple c# blocks had output as . I haven’t changed them for at least a month.
I still have windows 7 on this computer. At first, i tried to run my GH definition on different pc, that has windows 10. On that pc everything worked fine. I figured maybe there was .net update and my pc (win 7) wasn’t updated, soo i asked IT to update .net for me. After that everything worked until next day when the problem started again.
Here is the code for one of the blocks:
using Tekla.Structures;
using TSM = Tekla.Structures.Model;
using TSG = Tekla.Structures.Geometry3d;
...
private void RunScript(List<object> Columns, ref object Point)
{
var pList = new List<TSG.Point>();
for(int i = 0; i < Columns.Count; i++){
var column = (TSM.Beam) Columns[i];
var x = 0.0;
var y = 0.0;
var z = 0.0;
column.GetReportProperty("COG_X", ref x);
column.GetReportProperty("COG_Y", ref y);
column.GetReportProperty("COG_Z", ref z);
TSG.Point temp = new TSG.Point(x, y, z);
pList.Add(temp);
}
Point = pList;
}
Can anyone suggest what to do or how to fix this?