Simple Request Using PyPCAD API
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.
import PyPCAD.api as api
For further use, create an Application Object.
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. For example, 50.
app.AddText("HELLO", api.Apoint(0, 0, 0), 50)
Use ZoomExtents() to adjust the view to focus on the text within the ModelSpace.
app.ZoomExtents()
Save the Python file.
Run the program to view the outcome within the ModelSpace.
Related content
Introduction to Python COM/ActiveX API
Introduction to Python COM/ActiveX API
More like this
Python COM/ActiveX API's Guide
Python COM/ActiveX API's Guide
Read with this
API Reference (COM / ActiveX)
API Reference (COM / ActiveX)
Read with this
Sample Jobs
Sample Jobs
More like this
SDK Samples
SDK Samples
More like this
Setup and Installation Guide
Setup and Installation Guide
More like this