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 API: Load Case Labels

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
917 Views, 4 Replies

Robot API: Load Case Labels

Dear all,

 

Is there a way to access (modify, read) the load case labels via API? (I'm not referring to the case number, name or nature etc. but label)

 

Thanks in advance for the help!

 

Best regards,

Marcell

image.pngimage.png

Tags (2)
4 REPLIES 4
Message 2 of 5
Romanich
in reply to: Anonymous

Hi @Anonymous,

I tend to think that is not possible to change/assign labels for load cases using API.

2018-09-13_194117.png

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.

Roman Zhelezniak

Robot Evangelist & Passionate Civil Structural Engineer

LinkedIn | Robot & Хобот | App Store for Robot
EESignature


Message 3 of 5
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

Try  RobotSimpleCase.label

 



Rafal Gaweda
Message 4 of 5
Anonymous
in reply to: Rafal.Gaweda

Hi @Rafal.Gaweda,

 

Thanks for your answer!

 

I've actually just found that you can very easily read and modify case and combination labels using RobotSimpleCase.Label or IRobotCaseCombination.Label.

 

Best regards,

Marcell

Message 5 of 5
1234eddie
in reply to: Anonymous

Hi @Anonymous @Rafal.Gaweda 

 

you solved this with using API, i'm currently using dynamo with a python script, and try to achieve also to set the labels(because it's annoying that the label is the case name).

this is the API information.

API DOC simple case.JPG

this is my setup which creates the loadcase, only with the case name as label.

working code wrong label.JPG

This is the python code:

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)

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 error i get when i add "IRobotSimpleCase.label"

Error after adding Irobotsimplecase_label.jpg

This is what i have added in the code.

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,IRobotSimpleCase.label(LoadCaseLabel))

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

Can some one tell me what i should change to set the label for the loadcase.

 

I have added both dynamo files.

 

Thanks in advance,

 

Gr Edward.

 

 

 

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

Post to forums  

Autodesk Design & Make Report