Autodesk Robot Structural Analysis
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
How can I create this load with Robot API ?
I would like the load of dead weight with a coefficient.
10:charge verticale poids propre 1A5 Partie de la structure -Z Coef=0.20 MEMO :
I think it's not possible with text file.
Can you give me the macro for VB please ?
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Try the following one please:
Dim ra As New RobotOM.RobotApplication
Dim sc As RobotOM.RobotSimpleCase
Dim rc As RobotOM.RobotLoadRecordDead
sc = ra.Project.Structure.Cases.CreateSimple(10, "charge verticale", RobotOM.IRobotCaseNature.I_CN_PERMANENT, RobotOM.IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR)
rc = sc.Records.Get(sc.Records.[New](RobotOM.IRobotLoad
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_C
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_E
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_Z
rc.Objects.FromText("1 2 3 4 5")
If you find your post answered press the Accept as Solution button please. This will help other users to find solutions much faster. Thank you.

Artur Kosakowski
Support Specialist
Product Support
Autodesk, Inc.
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I_DRV_COEFF doesn't exist. Is it new ? I don't have Robot Pro 2012, I have Robot Pro 2011.
My macro
Sub poids_propre_coef()
Dim ra As New RobotOM.RobotApplication
Dim cas As RobotOM.RobotSimpleCase
Dim rc As RobotOM.RobotLoadRecordDead
Set cas = Loads.Get(nocasdecharge)
' sc = ra.Project.Structure.Cases.CreateSimple(10, "charge verticale", RobotOM.IRobotCaseNature.I_CN_PERMANENT, RobotOM.IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR)
rc = sc.Records.Get(cas.Records.[New](RobotOM.IRobotLoa dRecordType.I_LRT_DEAD))
If coefx = 0 Then
If coefz = 0 Then
MsgBox "Pas de coef pour la charge de poids propre!", vbOKOnly + vbExclamation, "INVALID FOLDER"
Exit Sub
Else
' rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_C OEFF, coefz) = True
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_Z , DirZ) = True
End If
Else
' rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_C OEFF, coefx) = True
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_X , dirx) = True
End If
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_E NTIRE_STRUCTURE, 0) = True
rc.Objects.FromText ("Tous")
End sub
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
replace
rc.SetValue(RobotOM.IRobotDeadRecordValues.I_DRV_COEFF, coefz)
by
rc.SetValue(3, coefz)

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This command doesn't work.
rc1.Objects.FromText ("1 2 3 4 5")
Sub poids_propre_coef()
Dim Loads As RobotCaseServer
Set Loads = robapp.Project.Structure.Cases
' Dim ra As New RobotOM.RobotApplication
Dim cas As RobotSimpleCase
Dim rc As RobotLoadRecordMngr
Dim rc1 As RobotLoadRecordDead
Set cas = Loads.Get(nocasdecharge)
' sc = ra.Project.Structure.Cases.CreateSimple(10, "charge verticale", RobotOM.IRobotCaseNature.I_CN_PERMANENT, RobotOM.IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR)
' rc = cas.Records.Get(cas.Records.New(IRobotLoadRecordTy pe.I_LRT_DEAD))
Set rc = cas.Records
i = rc.New(I_LRT_DEAD)
Set rc1 = rc.Get(i)
rc1.Objects.FromText ("1 2 3 4 5")
If coefx = 0 Then
If coefz = 0 Then
MsgBox "Pas de coef pour la charge de poids propre!", vbOKOnly + vbExclamation, "INVALID FOLDER"
Exit Sub
Else
rc1.SetValue 3, coefz
rc1.SetValue I_DRV_ENTIRE_STRUCTURE, 0
rc1.SetValue I_DRV_Z, DirZ
' rc1.Objects.FromText ("1 2 3 4 5")
End If
Else
rc1.SetValue 3, coefx
rc1.SetValue I_DRV_ENTIRE_STRUCTURE, 0
rc1.SetValue I_DRV_X, dirx
' rc1.Objects.FromText ("1 2 3 4 5")
End If
Set rc = Nothing
Set rc1 = Nothing
Set cas = Nothing
End Sub
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Try this:
rc1.Objects.FromText "1 2 3 4"

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok but why this command doesn't work ?
rc1.Objects.FromText "tous"
Re: dead weight with a coefficien t
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This command should work in Frencha language version of ARSA
try this code for french and english:
rc1.Objects.AddText "tous"
rc1.Objects.AddText "all"

Rafal Gaweda
Product Support
Autodesk, Inc.
