obj_count
Counts PCB/schematic objects by type with optional filters and scope, providing quick totals for active sheet, project, or specific document.
Instructions
Quick count of objects by type, faster than obj_query when you only need the count.
Args:
object_type: Altium object type constant (see obj_query for options)
scope: "active_doc" (default), "project", or
"doc:C:\path\Sheet.SchDoc" for a specific loaded sheet.
filter: Pipe-separated property=value conditions (AND logic)
Returns: Dictionary with "count" (and "sheets_processed" for project scope)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | active_doc | |
| filter | No | ||
| object_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||