Hardware-driven AutoCAD workflow for macOS
A middleware plugin that bridges the Loupedeck console with AutoCAD 2027 on macOS — replacing keyboard-heavy command entry with tactile buttons, rotary encoder panning, and a structured 60+ command hierarchy.
Physical input travels through three distinct layers before reaching AutoCAD — from Loupedeck hardware events down to osascript execution.
CadFlowPlugin bootstraps logging & resourcesCadFlowApplication watches bundle ID com.autodesk.autocad2027PluginLog and PluginResources helpersCadToolFolder groupsToolContext state machine tracks active folderBitmapBuilder pixel-art icons/usr/bin/osascript.Send() for tool buttons (3000ms timeout)SendAsync() for encoder input.scpt temp file, executes, cleans upThe three foundational classes that bootstrap and manage the plugin's lifecycle, application detection, and tool state.
Plugin base class. Registers the assembly with the service and initialises shared utilities in its constructor.ClientApplication. Provides application-specific awareness so the Loupedeck service can automatically switch to the CadFlow profile when AutoCAD becomes the frontmost window.CadToolFolder is currently open on the console. Enables the Confirm and Cancel slots to know their context at any time.PluginLog — wraps SDK logging with Info / Error / Warn methods.
PluginResources — wraps Assembly.GetManifestResourceStream() for loading embedded SVG icons.
Static utility class that generates AppleScript strings and executes them via /usr/bin/osascript — the gateway from C# into AutoCAD 2027.
Sanitise() converts to lowercase, escapes backslashes and double-quotes, and strips newlines — ensuring the string is valid inside an AppleScript keystroke block.
Velocity-scaled, non-blocking X/Y viewport panning. Handles high-frequency encoder input with delta accumulation to prevent missed events when osascript is busy.
FeedX() / FeedY() called on each encoder tick from the SDK_accumX / _accumY float accumulators_pendingDx / _pendingDyTryFire() acquires Interlocked CAS lock and dispatches one osascript call'_-pan 0,0 {dx},{dy} \n
_-pan a transparent command — it works inside other active AutoCAD commands without cancelling them. Sent via an inline AppleScript -e flag (no temp .scpt file) for maximum speed.
PluginDynamicAdjustment subclasses — one per axis — that forward encoder diffs to NudgeEngine.Instance.FeedX/Y().
CAD operations are organized into hierarchical CadToolFolder groups, each exposing an 8-button contextual grid on the Loupedeck device.
BitmapBuilder.FillRectangle() on a 60-unit virtual canvas. Icons are computed from the tile's label string — no external image assets required.
Context-free actions available regardless of which tool folder is active — Undo/Redo, viewport shortcuts, and mode toggles.
PluginDynamicCommand implementations. Always available.SendToggle() — work mid-command inside AutoCAD.Plugin manifest, bundled SVG icons, and the build pipeline for packaging and installing the plugin via the Loupedeck CLI.
| PackageName: | Loupedeck.MyPlugin |
| DisplayName: | CadFlow |
| Version: | 1.0.0 |
| ApplicationTarget: | com.autodesk.autocad2027 |
| ProfileScope: | Auto-activate on AutoCAD focus |
| DllName: | CadFlow.dll |
bin/Debug/actionicons/ — loaded via PluginResources, shown in the Loupedeck app UI (not on-device).Core terms used throughout the CadFlow codebase and Loupedeck SDK integration.