<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bar gets removed in second run (API/Dynamo) in Robot Structural Analysis Forum</title>
    <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9154545#M22027</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/589195"&gt;@Rafal.Gaweda&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/705292"&gt;@Artur.Kosakowski&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/559029"&gt;@Romanich&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7331480"&gt;@Krzysztof_Wasik&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I got this problem solved. after rethinking how the bar is created, that it’s not neccesary to draw the bar again. so ended up with adding this in the code “Create nodes and bar(1)”.(red boxes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Solved script.JPG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699300i782F692AE33809A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Solved script.JPG" alt="Solved script.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But i have one other question that when adding load to a bar it keeps adding the load as new everytime i run the script again with a bar change. See pictures below.&lt;BR /&gt;Run 1 works fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result run 1.JPG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699303i60253FEEC7BA7324/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Result run 1.JPG" alt="Result run 1.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Run 2 see red boxes(load has duplicated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result run 2.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699304i8FAE9C465C901203/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result run 2.JPG" alt="Result run 2.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the script which is added to the script in the start of this topic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Script Load to bar.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699305iB55ADF55518B6319/image-size/large?v=v2&amp;amp;px=999" role="button" title="Script Load to bar.JPG" alt="Script Load to bar.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Add load to bar(5)&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;import clr
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

objects = IN[0]
LoadCaseID = IN[1]
ILRT = IN[2]
LoadPX = IN[3]
LoadPY = IN[4]
LoadPZ = IN[5]


application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases


simplecase = loads.Get(LoadCaseID)

Uniform = []
Uniform.append(simplecase.Records.New(ILRT))
LoadRecord = simplecase.Records.Get(Uniform[0])
LoadRecord.SetValue(0,LoadPX)
LoadRecord.SetValue(1,LoadPY)
LoadRecord.SetValue(2,LoadPZ)
LoadRecord.Objects.FromText(objects)

#Assign your output to the OUT variable.
OUT = 0&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I think this part of the api could help me, but can’t figure out how to use it inside the script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IRobotLoadRecordMngr.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699306i1ABEE37F6B02B606/image-size/large?v=v2&amp;amp;px=999" role="button" title="IRobotLoadRecordMngr.JPG" alt="IRobotLoadRecordMngr.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone of you can provide me some insight why the loads keep adding up.&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;P&gt;Dynamo file attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 10:32:26 GMT</pubDate>
    <dc:creator>1234eddie</dc:creator>
    <dc:date>2019-11-19T10:32:26Z</dc:date>
    <item>
      <title>Bar gets removed in second run (API/Dynamo)</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9149328#M22025</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully someone can help me a little bit. I wrote i big script to make design calculations on a cantilever bar including load cases and combinations, all based on input from an excel file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i run it for the first time it works good(picture 1). but when changing the "bar section" or the "material" and running again(gives an message that robot is changing, picture 2) and the bar is getting removed(picture 3)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture 1" style="width: 112px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/698372i2F77B9B828F2BB41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1 Result first run.JPG" alt="Picture 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Picture 1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture 2" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/698374i69D6F273FF28B3EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2 message.JPG" alt="Picture 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Picture 2&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture 3" style="width: 145px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/698373i4DAE13CA53B424B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3 result second run.JPG" alt="Picture 3" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Picture 3&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the dynamo script i use(simplified for this forum)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Full script.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/698376i8CD62DAED91FE4A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Full script.JPG" alt="Full script.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The red marks around the sliders are there to change the bar section and the material.(normally done in Excel, but works the same).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully someone can explain me why is the bar removed in the second run?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS Dynamo file is attached.&lt;/P&gt;&lt;P&gt;Here a the Python scripts i used.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create nodes and bar(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import clr
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.
pnt = IN[0]
Barsection = IN[1]
Barnumber = IN[2]
Barmaterial = IN[3]
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases
ProjectPrefs = project.Preferences
#output
for i in range(len(pnt)):
	structure.Nodes.Create(pnt[i][0],pnt[i][1],pnt[i][2],pnt[i][3])
structure.Bars.Create(Barnumber,1,2)
selectionBars = structure.Selections.Get(IRobotObjectType.I_OT_BAR)
selectionBars.FromText(Barnumber)
steelsections = ProjectPrefs.SectionsActive
steelsections.Add("RCAT")
label = labels.Create(IRobotLabelType.I_LT_BAR_SECTION,Barsection)
labels.Store(label)
structure.Bars.SetLabel(selectionBars,IRobotLabelType.I_LT_BAR_SECTION,Barsection)
structure.Bars.SetLabel(selectionBars,IRobotLabelType.I_LT_BAR_MATERIAL,Barmaterial)
OUT = pnt&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Creating and adding support(2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import clr
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.

nodeSupportName = IN[0]
nodeSupportData = IN[1]
supportnodes = IN[2]

application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
#Assign your output to the OUT variable.

out = labels.Create(IRobotLabelType.I_LT_NODE_SUPPORT, nodeSupportName)
out.Data.UX = nodeSupportData[0]
out.Data.UY = nodeSupportData[1]
out.Data.UZ = nodeSupportData[2]
out.Data.RX = nodeSupportData[3]
out.Data.RY = nodeSupportData[4]
out.Data.RZ = nodeSupportData[5]
labels.Store(out)		
		
SelectionNodes = structure.Selections.Get(IRobotObjectType.I_OT_NODE)
SelectionNodes.FromText(supportnodes)
structure.Nodes.SetLabel(SelectionNodes,IRobotLabelType.I_LT_SUPPORT,nodeSupportName)
OUT = out.Name&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Own weight(3)&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;import clr
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.
LoadCaseNumber = IN[0]
LoadCaseName = IN[1]
IRCN = IN[2]
IRCAT = IN[3]
LCLabel = IN[4]

application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases

#output
if(loads.Exist(LoadCaseNumber)):
	OUT = LoadCaseName
if not(loads.Exist(LoadCaseNumber)):
	Caseeigengewicht = structure.Cases.CreateSimple(LoadCaseNumber,LoadCaseName,IRCN,IRCAT)
	Caseeigengewicht.Label = LCLabel

	Caseeigengewicht.Records.New(IRobotLoadRecordType.I_LRT_DEAD)
	LoadRecord = Caseeigengewicht.Records.Get(1)
	LoadRecord.SetValue(IRobotDeadRecordValues.I_DRV_Z,-1)
	LoadRecord.SetValue(IRobotDeadRecordValues.I_DRV_ENTIRE_STRUCTURE,True)
	OUT = LoadCaseNumber&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Calculate(4)&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;import clr
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.
objects = IN[0]
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
project.CalcEngine.AnalysisParams.IgnoreWarnings = True
calcEngine = project.CalcEngine
calcEngine.AutoGenerateModel = True
calcEngine.UseStatusWindow = True
OUT = calcEngine.Calculate()&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 16:14:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9149328#M22025</guid>
      <dc:creator>1234eddie</dc:creator>
      <dc:date>2019-11-15T16:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bar gets removed in second run (API/Dynamo)</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9152088#M22026</link>
      <description>&lt;P&gt;Hi all i forgot some information to mention.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The versions of the programs i use are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Robot structural analysis 2020&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dynamo studio 1.3.0.946/Dynamo core 1.3.4.6666&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/589195"&gt;@Rafal.Gaweda&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/705292"&gt;@Artur.Kosakowski&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/559029"&gt;@Romanich&lt;/a&gt;&amp;nbsp;maybe someone of you know why this is happening?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 08:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9152088#M22026</guid>
      <dc:creator>1234eddie</dc:creator>
      <dc:date>2019-11-18T08:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bar gets removed in second run (API/Dynamo)</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9154545#M22027</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/589195"&gt;@Rafal.Gaweda&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/705292"&gt;@Artur.Kosakowski&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/559029"&gt;@Romanich&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7331480"&gt;@Krzysztof_Wasik&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I got this problem solved. after rethinking how the bar is created, that it’s not neccesary to draw the bar again. so ended up with adding this in the code “Create nodes and bar(1)”.(red boxes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Solved script.JPG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699300i782F692AE33809A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Solved script.JPG" alt="Solved script.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But i have one other question that when adding load to a bar it keeps adding the load as new everytime i run the script again with a bar change. See pictures below.&lt;BR /&gt;Run 1 works fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result run 1.JPG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699303i60253FEEC7BA7324/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Result run 1.JPG" alt="Result run 1.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Run 2 see red boxes(load has duplicated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result run 2.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699304i8FAE9C465C901203/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result run 2.JPG" alt="Result run 2.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the script which is added to the script in the start of this topic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Script Load to bar.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699305iB55ADF55518B6319/image-size/large?v=v2&amp;amp;px=999" role="button" title="Script Load to bar.JPG" alt="Script Load to bar.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Add load to bar(5)&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;import clr
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

objects = IN[0]
LoadCaseID = IN[1]
ILRT = IN[2]
LoadPX = IN[3]
LoadPY = IN[4]
LoadPZ = IN[5]


application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases


simplecase = loads.Get(LoadCaseID)

Uniform = []
Uniform.append(simplecase.Records.New(ILRT))
LoadRecord = simplecase.Records.Get(Uniform[0])
LoadRecord.SetValue(0,LoadPX)
LoadRecord.SetValue(1,LoadPY)
LoadRecord.SetValue(2,LoadPZ)
LoadRecord.Objects.FromText(objects)

#Assign your output to the OUT variable.
OUT = 0&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I think this part of the api could help me, but can’t figure out how to use it inside the script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IRobotLoadRecordMngr.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699306i1ABEE37F6B02B606/image-size/large?v=v2&amp;amp;px=999" role="button" title="IRobotLoadRecordMngr.JPG" alt="IRobotLoadRecordMngr.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone of you can provide me some insight why the loads keep adding up.&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;P&gt;Dynamo file attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:32:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/bar-gets-removed-in-second-run-api-dynamo/m-p/9154545#M22027</guid>
      <dc:creator>1234eddie</dc:creator>
      <dc:date>2019-11-19T10:32:26Z</dc:date>
    </item>
  </channel>
</rss>

