What's new

AlibreScript Help Tutorials in .py

stepalibre

Alibre Super User
Taken from:

Contents:
Assembly-Constraints.py
Bolt-Creator.py
Calculating-Length-of-Curves.py
Cap-Screw-ISO-4762-Bolts.py
Copy-sketch.py
Create-and-Modify-Global-Parameters.py
Create-Reference-Planes-Axes-and-Points.py
Creating-a-3D-Sketch-with-a-Spline-and-an-Arc.py
Creating-a-Cylinder-Between-Two-Points.py
Creating-and-Manipulating-Assemblies.py
Custom-Values-and-Settings-Window.py
Default-Reference-Geometry.py
Drop-Down-Lists.py
Everyone-Loves-a-Slinky.py
Gear-Example.py
Geodesic-Dome-Reference-Geometry.py
Getting-User-Input.py
Helical-spring.py
Import-points-from-a-CSV-file-rotate-them-and-connect-into-a-polyline.py
Importing-Files.py
Joint-Creator.py
List-All-Parts-in-an-Assembly-and-Sub-Assemblies.py
Lofting-with-a-Guide-Curve.py
Midplane-Extrusion.py
Mobius-Strip.py
Modify-an-Existing-Part.py
Parameters-with-Units.py
Pocket-Hole-Creator.py
Polygon-Incircle.py
Profile-and-Sweep-Path.py
Reading-from-a-Spreadsheet.py
Rectangular-hollow-formed-profiles.py
Reference-Geometry.py
Scaling-a-Sketch.py
Servo-Cam.py
Slice-a-Part.py
Square-hollow-formed-profiles.py
Supressing-Unsupressing-and-Removing-Features.py
Tool-Cutting.py
Triangle.py
Type-11-flanges-according-to-BS-EN-1092-PN16.py
Units.py
Useful-Dialogs.py
Wave-washer.py
Working-with-Configurations.py

Example:
Python:
https://help.alibre.com/articles/#!alibre-help-v23/creating-a-3d-sketch-with-a-spline-and-an-arc

Units.Current = UnitTypes.Inches
 
P = Part('My Part')
 
# create 3d spline from a set of interpolation points
Path = P.Add3DSketch('Path')
Points = [0.6, -0.6625, 0.0]
Points.extend([0.6, -0.6625, -0.2175])
Points.extend([0.6, -0.8125, -0.6795])
Path.AddBspline(Points)
 
# arcs are counter clockwise, so to get a clockwise arc the start and end points are swapped
Path.AddArcCenterStartEnd(-5.6634, -3.92, -0.6795, 0.6, -7.0275, -0.6795, 0.6, -0.8125, -0.6795)


Can be added to your library:

1695746027150.png

Delete or comment the links at the top, before run.
1695761602370.png
Source:

I believe the scripts should work in any AlibreScript supported version?
 
Last edited:
Top