Robot load case labels(dynamo, API, Python)

Hi all,

I’m trying to use dynamo to create loadcases and combinations in robot,(normally a time consuming proces). i got this working (see this link). but the problem i have now is that the loadcase label is the same as the loadcase name. In this topic it was solved, but i can’t get it working.

Hopefully someone can tell me what i should change??

This is the error i get when running te script. (the loadcase is well created)

This is the python script

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.
LoadCaseName = IN[0]
LoadCaseNumber = IN[1]
LoadCaseLabel = IN[2]
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases
#output
Caseeigengewicht = structure.Cases.CreateSimple(LoadCaseNumber,LoadCaseName,IRobotCaseNature.I_CN_PERMANENT,IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR)

label = labels.Create(IRobotSimpleCase.Label(1,"EG"))
labels.Store(label)
structure.Cases.SetLabel(1,IRobotSimpleCase.Label,"EG")

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

This is the loadcase label which should be “EG”
loadcase%20label

corresponding chapters in robot API documentation

Irobot%20simple%20case%20fields

as attachment the dynamo file(you can run it with just an empty robot file)

Thanks in advance,

Gr Edward.
python loadcase label simplecase label.dyn (3.9 KB)

This problem was solved on the Robot structural Analysis forum.
See this link