ADScript makes it easy to use Alibre Design with Python scripting. For example creating a new part:

[code language=”python”]
Test = Part("Test")
[/code]

We can get access to planes in the design workspace, for example:

[code language=”python”]
XYPlane = Test.GetPlane("XY-Plane")
[/code]

Once we have a part and plane we can create a sketch on the plane:

[code language=”python”]
MySketch = Test.AddSketch("MySketch", XYPlane)
[/code]

Adding to the sketch is easy:

[code language=”python”]
MySketch.AddCircle(0, 0, 10, False)
[/code]

Now we can extrude it:

[code language=”python”]
Object = Test.AddExtrudeBoss("Object", MySketch, 5, False)
[/code]

Comments are closed