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: Masses and selfweight

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
804 Views, 4 Replies

ROBOT-API: Masses and selfweight

Hi everyone!

I recently discovered ROBOT API and I need some help for several things in my macros:

1/ I would like to know the commands to add nodal masses. I found out in the Robot API Tutorial how to create and set cases and loads but i couldn't find how to generate masses automatically, as if I was using the "Added Masses - Weights" table directly in the software.

2/ I'm trying to find a way to modify the factor value of a self-weight load (to change it from 1 to 0,5 for example) but i coudn't find how anywhere in the forum nor the tutorial. Moreover, I don't how to set the list of elements to "Whole structure" and i'm forced to cheat by saying for example  "1to100", if I know that my structure will have less than 100 elements. Here is my code so far: 

''Définition des chargements accidentels sur toute la structure
For k = 3 To 5
    Set cas = robapp.Project.Structure.Cases.Get(k)
    cas.Records.New I_LRT_DEAD
    Set rec = cas.Records.Get(1)
    rec.Objects.FromText "1to100"
    Select Case k
    Case Is = 3
    rec.SetValue I_BDRV_X, 1
    Case Is = 4
    rec.SetValue I_BDRV_Y, 1
    Case Is = 5
    rec.SetValue I_BDRV_Z, 1
    End Select
Next

The "1" argiment in "rec.SetValue I_BRDV_X,1" command is only to define if the load is in the same direction as X axis  or in the other one. I couldn't managed to change the factor of the load.

 

 

 Could someone help me with those issues? I don't know if I'm being clear enough but i could give more informations if needed.


Thanks a lot in advance!!

Gabin

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


2/ I'm trying to find a way to modify the factor value of a self-weight load (to change it from 1 to 0,5 for example) but i coudn't find how anywhere in the forum nor the tutorial. Moreover, I don't how to set the list of elements to "Whole structure" 

 

Dim SCase As RobotSimpleCase
......
                       
                Set RecordNew = SCase.Records.Create(I_LRT_DEAD)
                
                RecordNew.SetValue I_DRV_COEFF, 0.6
                RecordNew.SetValue I_DRV_ENTIRE_STRUCTURE, 1
                RecordNew.SetValue I_DRV_Z, -1

 

 



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

 i coudn't find how anywhere in the forum nor the tutorial. Moreover, I don't how to set the list of elements to "Whole structure" and i'm forced to cheat by saying for example  "1to100", if I know that my structure will have less than 100 elements. 

 

Try harder.

for example in this macro: http://forums.autodesk.com/t5/Robot-Structural-Analysis/API-Exporting-modal-harmonic-load-case-getti...

 

RSelection.FromText "all"       'for english robot
RSelection.FromText "tous"    'french 
RSelection.FromText "wsz"     ' polish  , and so on

 

 



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


1/ I would like to know the commands to add nodal masses. I found out in the Robot API Tutorial how to create and set cases and loads but i couldn't find how to generate masses automatically, 

HINT: load to mass conversion is stored as case =  -1

Unfortunately not complete load to mass conversion record can be generated by API. Hope it will be implemented soon.

 

This is all you can set\get now:

    Dim cas As RobotSimpleCase
    Dim rec As RobotLoadRecord
    
Set cas = robapp.Project.Structure.Cases.Get(-1)

Set rec = cas.Records.Create(I_LRT_MASS_ACTIVATION)
    rec.SetValue I_MARV_FACTOR, 0.7
    rec.SetValue I_MARV_CASE_NUM, 3
    rec.SetValue I_MARV_ACTIVATION_DIR, 2
    rec.SetValue I_MARV_SIGN, 1

 

 



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

as if I was using the "Added Masses - Weights" table directly in the software.

HINT for code below: SCase must be Modal case

 

                Set RecordNew = SCase.Records.Create(I_LRT_NODE_FORCE_MASS)
                
                RecordNew.SetValue I_NFRV_FZ, 10
                RecordNew.Objects.FromText "1"

 

 



Rafal Gaweda

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

Post to forums  

Autodesk Design & Make Report