sw-api-patterns
Installation
SKILL.md
SolidWorks API Patterns
Getting Active Document
var swApp = (ISldWorks)Application;
var model = swApp.ActiveDoc as IModelDoc2;
if (model == null) return; // Always null-check
Traversing Features
var feat = model.FirstFeature() as IFeature;
while (feat != null)
{
// Process feature...
feat = feat.GetNextFeature() as IFeature;
}