Below is a demonstration of a To create a simple API request in Python using the PyPCAD API, do the following:
Import the Python API and assign an alias 'api' for future reference.
Code Block language py import PyPCAD.api as api
For further use, create an Application Object.
Code Block language py app = api.PyPCAD()
Use AddText() to include text on the ModelSpace. Use Apoint() to pinpoint the location on the ModelSpace where the text will be inserted, specifying the desired height (e. g.For example, 50).
Code Block language py app.AddText("HELLO", api.Apoint(0, 0, 0), 50)
Use ZoomExtents() to adjust the view to focus on the text within the ModelSpace.
Code Block language py app.ZoomExtents()
Save the Python file and run .
Run the program to observe view the outcome within the ModelSpace.
...