TAGGED: #python-#ironpython, ansys-spaceclaim, beam
-
-
December 8, 2025 at 11:01 am
mgrenier
SubscriberHello,
I am trying to create a beam using the Spaceclaim Script Python tool :
# Python Script, API Version = V241
ClearAll()R1 = 0.05 #radius of the beam
x1, y1, z1 = 0, 0, 0 #start
x2, y2, z2 = 2, 0.5, 0 #endp1 = Point.Create(x1, y1, z1)
p2 = Point.Create(x2, y2, z2)
#line between the two points
segment = CurveSegment.Create(p1, p2)
part = GetActivePart()
line = DesignCurve.Create(part, segment)
line.SetName("Beam")
sel = Selection.Create(line)
Â
# creation of the profile
profile=BeamProfile.CreateDisk(R1, "disk")#creation of the beam
Beam.Create(sel, profile)Here is the error :
Beam.Create(sel, profile)
expected ISelection, got CreateBeamProfileResultUnfortunately, I cannot figure out how to create a beam using the script. Is there any documentation explaining how to do that?
Thank you for your help.
Kind regards,
Mathis
-
December 9, 2025 at 5:17 am
mohan.urs
Ansys EmployeeHey,
Can you check this link - How to create a Beam in Spaceclaim? - Community Forum.Â
Also utilize Home - Community Forum - this forum for scripting related issues so that you can get a quick response.Regards,
Mohan Urs -
December 9, 2025 at 8:35 am
mgrenier
SubscriberHello,
Thank you, that is exactly what I was looking for.
Best regards,Â
Mathis
-
- You must be logged in to reply to this topic.
- Project lines/edges into a face with the direction normal to the face
- No preview in explorer with scdox file
- Add-in Error Excel
- Fileformats
- Discovery 2025r2 failed to initialize
- Spaceclaim problem
- Using SpaceClaim scripts vs recorded blocks for parametric optimization workflow
- Different Body Naming and Extra Surfaces after Importing Solid Edge Part
- racing royals
- New Computer
-
4597
-
1495
-
1386
-
1209
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.
