Python script loadrecord.fromtext

Hi all,

As autodesk has stopped supporting dynamo studio, i have to tranfser my scripts to dynamo inside Robot Structural Analysis 2022.
The base part of my script is working. but i have a list that the script reads wrong.
this is the list as input.


this is the first edit i do. 'take a string from the list at index 0
2_ take string from list 0
then in row 272 with dynamo studio 2017 the values where set to the whole list. but now it only works on 1.
3_ should read from text

This should be the result.

and this is what i get now.

I guess it’s probably some easy steps to take but for me it quite annoying at the moment.

Hope someone of you can explain me why this is happening?

@jacob.small @Jonathan.Olesen

Thanks in advance.

Gr Edward

Can you show the entire loop which contains line 242? Pasting the code as pre formatted text would be best.

@jacob.small
this is the part of the script where i use the function string.

import clr
import math
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

from System import Environment
user = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
clr.AddReferenceToFileAndPath(user +r"\Dynamo\Dynamo Core\1.3\packages\Structural Analysis for Dynamo\bin\RSA\Interop.RobotOM.dll")
from RobotOM import *
from System import Object
#The inputs to this node will be stored as a list in the IN variables.

Stapinstelling = IN[16]

application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases
ProjectPrefs = project.Preferences
bars = structure.Bars
nodes = structure.Nodes

j=0

while j<=(profielen-1):
	k=0
	while Totaal_Unity_UenSLS>=1.0 or RotatieOnder_max_ULS>=anglelimit:
		application.Interactive = False
		stap = Stapinstelling
		loadnodes = str(stap[0])
		
		for h in range(len(Load_INST)):
			cas = structure.Cases.Get(Load_INST[h][0])
			simplecase = IRobotSimpleCase
			simplecase = cas
			rec = IRobotLoadRecord
			IRobotLoadRecordMngr = simplecase.Records
			count = IRobotLoadRecordMngr.Count
			for i in range(count+1)[::-1]:
				rec = simplecase.Records.Delete(i)
			Uniform = []
			Uniform.append(simplecase.Records.New(Load_INST[h][1]))
			LoadRecord = simplecase.Records.Get(Uniform[0])
			LoadRecord.SetValue(0,Load_INST[h][2])
			LoadRecord.SetValue(1,Load_INST[h][3])
			LoadRecord.SetValue(2,Load_INST[h][4])
			LoadRecord.SetValue(3,Load_INST[h][5])
			LoadRecord.SetValue(4,Load_INST[h][6])
			LoadRecord.SetValue(5,Load_INST[h][7])
			LoadRecord.Objects.FromText(loadnodes)

thanks in advance