Getting Started With Scripts¶
Some simple Python script examples:
Display the Impact executable name and version — see example for the Application object.
See what type of drawing is currently active — see example for the
drawing_typeproperty.Display the attributes for each layer in the current drawing — see example for the ILayer object.
Draw a line in the active block—use — see example for the
ActiveBlock.line_admethod.Find a project in the database — see example for the
IDatabase.find_item_by_namemethod.Create a new project, save it, and release it — see example for the
release_actionproperty.Mimic the “Enquire > Palette & Symbol Usage” tool — see example for the IEnquireInsertions object.
You can copy each of these examples into the Impact Script Toolbox (Window > Standard Toolboxes > Script Toolbox - make sure to select Language: Python) and press Run to execute the script.