U225X PUBLIC-SAFE CONVERSATION NOTE RECORD: CHAT-0351 TOPIC: SOLIDWORKS Rotation Macro IMPORTED: 2026.04.15 This note was generated from a matching conversation in the supplied ChatGPT export. EXTRACTED REQUEST: is there a way to precisly roate this view so it looks like the red boxc, if not can we write a macro that works like this, i select a line of the part in the view and it roates it this is solid works 2025 RECOVERED CONVERSATION EXCERPTS USER MESSAGES: 1. is there a way to precisly roate this view so it looks like the red boxc, if not can we write a macro that works like this, i select a line of the part in the view and it roates it this is solid works 2025 2. i selected this and ran the macro and it said to select a straight sketch line or visable linear model edge in the drawing view 3. could not find a straight seleected line/edge try clicking directly on one.... i tried clicking on one and got the same error 4. ok...mis communincation, these parts are at odd angles because that is how they live in the welded part, I need to roate the view so the part itself rotates to the sheet ASSISTANT RESPONSES: 1. Yes — you can rotate a drawing view precisely in SOLIDWORKS, but the built-in way is usually just by entering an angle. There is not a great out-of-the-box “pick a line and make it horizontal” command. So the better way here is a macro. This macro works like this: - you click one straight line or visible linear edge in the drawing view - run the macro - it rotates that view so the selected line becomes exactly horizontal - optional: you can enter `90` if you want that line vertical instead Use this in SOLIDWORKS 2025 VBA macro: [code excerpt omitted] How to use it: 1. Open the drawing. 2. Click a straight edge or line in that view. 3. Run the macro. 4. Type: - `0` to make that line horizontal - `90` to make th… 2. Yep — that happened because SOLIDWORKS is probably selecting the view itself along with the edge, and the macro grabbed the wrong selected object first. In your screenshot, the orange box around the whole view is the giveaway. Use this version instead. It: - scans all selected items - ignores the drawing view selection - finds the first actual straight line / linear edge - rotates the view so that selected edge becomes horizontal or vertical [code excerpt omitted] How to use it: 1. Click one straight edge of the tube. 2. It is okay if the whole view highlights too. 3. Run macro. 4. Enter `0`. A couple of important things: - click the actual black model edge, not the orange view border - do not click a rounded… 3. Ah — got it now. The part is modeled at an odd angle inside the weldment, and you want the drawing view of that body to come in square to the sheet, not stay at the weldment’s modeled rotation. Yes — that is doable, but the clean way is not rotating the drawing after the fact. Best way Create a custom named view in the weldment part that is aligned to that body, then use that named view in the drawing. That way: - the body can stay modeled however it needs to in the weldment - the drawing view comes in square to the sheet - no guessing angles - no unreliable edge-picking in the drawing Do this In the weldment part 1. Open the weldment part. 2. Hide everything except the body you want, if that helps. 3. Select… EXTRACTED KNOWLEDGE / HOW-TO - you click one straight line or visible linear edge in the drawing view - run the macro - it rotates that view so the selected line becomes exactly horizontal - optional: you can enter `90` if you want that line vertical instead - Use this in SOLIDWORKS 2025 VBA macro: - Set swApp = Application.SldWorks - Set swModel = swApp.ActiveDoc - Set swMathUtil = swApp.GetMathUtility CONVERSATION SHAPE: 6 user turns / 10 assistant turns ATTACHMENTS DETECTED: 47 Raw transcripts, private details, exact locations, account information, employer/customer-confidential material, and restricted software references are not published in this note. PROPERTY OF U225X / PUBLIC-SAFE IMPORT