Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm currently working on a script to draw a polyline in RSA by using a python script inside dynamo.
(i will use this line later to apply a load in it[it will be part of a panel edge])
But at the moment i can't get the script working. I get this error:
This is the function inside RSA
below my script i wrote:
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
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
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
loads = structure.Cases
objects = structure.Objects
ProjectPrefs = project.Preferences
pts = application.Kernel.CmpntFactory.Create(IRobotComponentType.I_CT_POINTS_ARRAY)
#pts = application.Kernel.CmpntFactory.Create(IRobotComponentType.I_CT_GEO_POLYLINE)
obj_server = IRobotObjObjectServer
obj = IRobotObjObject
pts.SetSize(2)
pts.Set(1, 0, 0, 0)
pts.Set(2, 10, 0, 0)
obj_server.CreatePolyline(IRobotObjObjectServer.CreatePolyline,1,pts)
OUT = 0I hope someone of you can tell me what is should change of append different?
Thanks in advance
gr Edward
files are attached.
Solved! Go to Solution.
