SOLIDWORKS Macro: Bounding Box Offset Lines in Drawings — IView.GetOutline VBA Script
A question on the SOLIDWORKS User Forum asks whether there is any way to automatically create an offset rectangle from a drawing view’s bounding box. Kevin Chandler — one of the most prolific responders on that forum — gives the short answer: “Auto? No, unless via the API.” That’s the entire opening for this post. The native UI does not support it. The API does. The use cases are real and recurring: inspection templates with a fixed clearance zone around each view, nesting documentation where each part gets a border at a set offset, supplier drawings where the view boundary needs to be marked explicitly for DXF nesting software. All of them need the same thing: a rectangle drawn in the sheet sketch, offset from the view’s outline, assigned to a controlled layer. ...