Greetings,
I am working with Advance Steel and would like to create complex structures using Dynamo and Python (I have already done similar things using Revit, Dynamo and Python). I have troubles placing beams using the Beams.StraightBeam.ByStartPointEndPoint()
function. The problem is that only the last beam is visible in the AdvanceSteel GUI (in Dynamo’s 3D preview, both lines representing the two beams are visible).
Does anybody know what is the problem, please see the bellow code of the Python Script (I would attach a minimal working example, however as a new user, I am not allowed). Only the last beam is placed in Advance Steel.
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('AdvanceSteelNodes')
from AdvanceSteel.Nodes import *
# POINTS
P1a = Point.ByCoordinates(0.0, 0.0, 0.0)
P1b = Point.ByCoordinates(0.0, 0.0, 1000.0)
P2a = Point.ByCoordinates(200.0, 200.0, 0.0)
P2b = Point.ByCoordinates(200.0, 200.0, 1000.0)
# BEAM TYPES
beamtype1 = Property.ByNameAndValue('Profile Name', 'U_Kalt nach DIN#@§@#U160/65X7')
beamtype2 = Property.ByNameAndValue('Profile Name', 'RHS rund EN10210-2 1990#@§@#RHSØ48.3x3.2')
# BEAMS
Beams.StraightBeam.ByStartPointEndPoint(P1a, P1b, Vector.YAxis(), 4, False, [beamtype1])
Beams.StraightBeam.ByStartPointEndPoint(P2a, P2b, Vector.YAxis(), 4, False, [beamtype2])
The only solution I found is to generate lists with data (points, orientation and properties) using Python Script and then input them into the standard StraightBeam.ByStartPointEndPoint
node (here, for some reason, Auto lacing is not working, it must be set to Shortest or Longest).
I also tried copying the above code into Code Block
node, without the imports and the last two lines modified to
StraightBeam.ByStartPointEndPoint(P1a, P1b, Vector.YAxis(), 4, false, [beamtype1]);
StraightBeam.ByStartPointEndPoint(P2a, P2b, Vector.YAxis(), 4, false, [beamtype2]);,
and it is working, however I am really hoping if someone has the solution for Python method.
I am using Advance Steel 2023 (product version 601) and Dynamo 2.13.1.3887 (add-on in Advance Steel).
Best regards