Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Nov 17, 2021
Messages
3
Location
US

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)
 
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

Back
Top