- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I wrote a script inside Dynamo to create a "linear load on edge". the script works and aplies the load on the edge.
this is my graph:
this is the result from the scrip in RSA
and in the red box in this picture the result when i do it by myself.
The result in the red box is what i'm trying to achieve with my dynamo script. because i work on projects where i have lots of loads applied to edges, and this will repeat for every single case i have. so when i now have to print a report i end up with many pages with load records. while i prefer to have it all in one list.
I hope someone can provide me some insight how to create the list i'm looking for?
@Rafal.Gaweda I checked your link, but this is a little bit different.
Thanks in advance.
Gr Edward.
The script works also for load on edges of panels.
All files are attached.
Here is the script Load on edge
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
Object = IN[0]
Sup_edge = IN[1]
LoadCaseNumber = IN[2]
LoadPX = IN[3]
LoadPY = IN[4]
LoadPZ = IN[5]
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases
CreatedLoads = []
for i in range(len(Object)):
case = structure.Cases.Get(LoadCaseNumber)
simplecase = IRobotSimpleCase
simplecase = case
rec = IRobotLoadRecord
IRobotLoadRecordMngr = simplecase.Records
obj = IRobotObjObject
obj = structure.Objects.Get(Object[i])
Uniform = []
Uniform.append(simplecase.Records.New(IRobotLoadRecordType.I_LRT_LINEAR_ON_EDGES))
LoadRecord = simplecase.Records.Get(Uniform[0])
LoadRecord.SetValue(0,LoadPX)
LoadRecord.SetValue(1,LoadPY)
LoadRecord.SetValue(2,LoadPZ)
LoadRecord.Objects.FromText(Sup_edge[i])
CreatedLoads.append(LoadRecord.UniqueID)
obj.Update
OUT = "gedaan"
Solved! Go to Solution.