Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solidworks Macro to Change the view of drawing

Status
Not open for further replies.

joshF

Industrial
Nov 17, 2021
3

I have a slick macro to open a sw template and make the 3 views for a drawing. However, drawingview1 is a *front view orientation. I would like to add code to switch drawingview1 to a *top orientation. Should be an easy code, I just can't find it. Can someone make a suggestion?


asmPath = swModel.GetPathName
Dim myView As Object
Set myView = Part.DropDrawingViewFromPalette2("Drawing View1", 0.165525838871151, 0.140426998540005, 0)
boolstatus = Part.Create3rdAngleViews(asmPath)
 
Replies continue below

Recommended for you

joshF,

I thought SolidWorks did that automatically.

In any case, I would not use it. I usually insert the first view which I regard as primary, then I work out which other views I need. When I start designing, I have no idea what my primary view will be. When I start drafting, I have no idea of what my secondary views will be. Your script cannot anticipate what these will be, either.

--
JHG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor