Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Robot load case labels(dynamo, API, Python)

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
1234eddie
1465 Views, 5 Replies

Robot load case labels(dynamo, API, Python)

Hi @tuska.marci @Rafal.Gaweda and others.

 

Im 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)

Error after adding Irobotsimplecase_label.jpg

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 label.JPG

 

corresponding chapters in robot API documentation

API DOC simple case.JPGIrobot simple case fields.JPG

 

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

 

Thanks in advance,

 

Gr Edward.

5 REPLIES 5
Message 2 of 6
1234eddie
in reply to: 1234eddie

Hi 

 

@Artur.Kosakowski @Rafacascudo @Romanich 

Can someone of you help me with this guys? 

I would really love to solve this problem. (i want to solve because i can't sent it to a client, with te wrong labels.)

 

Thanks in advance.

 

Gr Edward

Message 3 of 6
Rafacascudo
in reply to: 1234eddie

can´t help you with that . probably @Rafal.Gaweda is the one to do it

Rafael Medeiros
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 4 of 6
Rafal.Gaweda
in reply to: Rafacascudo

Hi @1234eddie 

 

I hope You meant this (label is not the case name).

(VBA example but it should be clear enough to understand) 

 

swlabel.jpg



Rafal Gaweda
Message 5 of 6
Rafal.Gaweda
in reply to: Rafal.Gaweda

Hi @1234eddie 

 

Short explanation: Labels created \ got by Labels server or by HasLabel \ SetLabel are objects like bar Section, Support, Releases, Materials and so on. 

This label (misleading name in this case) is just a string = text.

 



Rafal Gaweda
Message 6 of 6
1234eddie
in reply to: Rafal.Gaweda

Many thanks @Rafal.Gaweda 

 

Your photo and explanation made it clear for me.

 

I have attached the corrected dynamo file.

 

Gr Edward

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report