First import contour loads (automatically for all simple cases)
Then you can change values in Px1..Pz3 columns, and X Y Z columns and run Update
Do not make any change in Case, Record, Object List or Number of contour points columns (or modify macro by your own to consider these or other changes you want)
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Rafal ,
great tool !
It would be nice if the units used in the model could be kept when you press " Get contour loads".
I´m using tf/m2 and the loads are imported in N/m2
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.
Who volunteers to do so?
Example code for geting units (for force and moment) from Robot:
Dim projPref As RobotProjectPreferences Set projPref = Robot.Project.Preferences Dim RU As RobotUnitData Set RU = projPref.Units.Get(I_UT_FORCE) Dim RUCD As RobotUnitComplexData Set RUCD = projPref.Units.Get(I_UT_MOMENT)
when you input a load manually in excel and then update it gives you a runtime error.
i have a building whose contour loads are the same for several typical stories and till now there's no practical method of aplying these loads wihtout it being tedious.
i tried inputing the loads manually in excel and then clicking "update loads" but it just wouldn't work.
any help would be much appreciated.
Check \ set \ register Robot this way:
Good morning,
very "smart" and speedy API.
Thanks
I've tried this way but this add-in could not run. When I chose contour and pressed " Get contour loads", nothing happened!!! (My model have a contour with area load).
Another add-in by VBA run normally.
Hi @Rafal.Gaweda,
Could you please confirm that the method which operates with the marked checkbox is not implemented in the API?
Or maybe I'm wrong (fingers crossed)?
Updated:
Robot is really cool - I_ICRV_AUTO_DETECT_OBJECTS
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
Updated macro attached. One column has been added (0 - checkbox is off, 1 - checkbox is on).
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
Hello
I would like to create a load in C #.
I do not understand how to create the contour of this one?
I'm deadlocked ...
Thanks
JM Stevenant
My code:
Hi @Anonymous
Just edit my macro to see what is missing.
LoadRecord.SetContourPoint .........
Thank you for your prompt reply.
However, I have already tried and it's bug:
Severity Code Description Project File Line Deletion Status
Error CS1061 'RobotLoadRecord' does not contain a definition for 'SetContourPoint' and
no 'SetContourPoint' extension method that accepts a first argument of type 'RobotLoadRecord'
was found (using directive or assembly reference) missing?)
Thank you for your help.
Hi @Anonymous
My guess it that your LoadRecord is of not correct type.
You need something like this:
RobotLoadRecordInContour LoadRecord= (RobotLoadRecordInContour)case.Records.Get(UniformInCountour);
Hi,
I just started using ROBOT programming tools.
can you please help me finding what is missing in my VBA code? I'm getting a warning after launching calculus "incorrect definition of contour load ...."
Beside, changing I_ICRV_PZ2 and I_ICRV_PZ3 has no effect on my load
PS : All variables are declared
iLC = iLC + 1
Dim LGR As RobotSimpleCase
Set LGR = pipo.Cases.CreateSimple(iLC, "Longrine", I_CN_PERMANENT, I_CAT_STATIC_LINEAR)
chargeAppli = LGR.Records.New(I_LRT_IN_CONTOUR)
Set LoadRecCont = LGR.Records.Get(chargeAppli)
'Define the list of objects to which load will be applied.
LoadRecCont.Objects.FromText "3"
donnee1 = Val(ActiveSheet.Range("D15"))
donnee2 = Val(ActiveSheet.Range("E15"))
donnee3 = Val(ActiveSheet.Range("F15"))
donnee4 = Val(ActiveSheet.Range("G15"))
LoadRecCont.SetValue I_ICRV_PX1, 0
LoadRecCont.SetValue I_ICRV_PY1, 0
LoadRecCont.SetValue I_ICRV_PZ1, -donnee1 * donnee2 * 1000
LoadRecCont.SetValue I_ICRV_AUTO_DETECT_OBJECTS, 0
LoadRecCont.SetValue I_ICRV_NPOINTS, 4
LoadRecCont.SetContourPoint 1, 0, donnee3, haut
LoadRecCont.SetContourPoint 2, ouv, pas_biais + donnee3, haut
LoadRecCont.SetContourPoint 3, ouv, pas_biais + donnee3 + donnee4, haut
LoadRecCont.SetContourPoint 4, 0, donnee3 + donnee4, haut
LoadRecCont.SetValue I_ICRV_PY2, 0
LoadRecCont.SetValue I_ICRV_PZ2, -1000
LoadRecCont.SetValue I_ICRV_PX3, 0
LoadRecCont.SetValue I_ICRV_PY3, 0
LoadRecCont.SetValue I_ICRV_PZ3, -8000
Hi @Anonymous
You missed SetPoint.
Example code below:
Private Sub CommandButton1_Click()
Dim robapp As New RobotApplication
Dim LGR As RobotSimpleCase
Set LGR = robapp.Project.Structure.Cases.Get(1)
chargeAppli = LGR.Records.New(I_LRT_IN_CONTOUR)
Set LoadRecCont = LGR.Records.Get(chargeAppli)
'Define the list of objects to which load will be applied.
LoadRecCont.Objects.FromText "3"
donnee1 = 3
donnee2 = 3
donnee3 = 3
donnee4 = 3
LoadRecCont.SetValue I_ICRV_AUTO_DETECT_OBJECTS, 0
LoadRecCont.SetValue I_ICRV_NPOINTS, 4
LoadRecCont.SetContourPoint 1, 0, donnee3, 0
LoadRecCont.SetContourPoint 2, 3, 1 + donnee3, 0
LoadRecCont.SetContourPoint 3, 3, 1 + donnee3 + donnee4, 0
LoadRecCont.SetContourPoint 4, 0, donnee3 + donnee4, 0
LoadRecCont.SetValue I_ICRV_PX1, 0
LoadRecCont.SetValue I_ICRV_PY1, 0
LoadRecCont.SetValue I_ICRV_PZ1, -donnee1 * donnee2 * 1000
LoadRecCont.SetValue I_ICRV_PY2, 0
LoadRecCont.SetValue I_ICRV_PZ2, -1000
LoadRecCont.SetValue I_ICRV_PX3, 0
LoadRecCont.SetValue I_ICRV_PY3, 0
LoadRecCont.SetValue I_ICRV_PZ3, -8000
LoadRecCont.SetPoint 1, 0, donnee3, 0
LoadRecCont.SetPoint 2, 3, 1 + donnee3, 0
LoadRecCont.SetPoint 3, 3, 1 + donnee3 + donnee4, 0
End Sub
thank you.
the first problem is remains. After lunching the calculus I've got the warning bellow :
"Incorrect definition of contour load for the load case 2" : the load case 2 is actually the one I'm setting
Can't find what you're looking for? Ask the community or share your knowledge.