INTELLIGENT WORK FORUMS FOR ENGINEERING PROFESSIONALS
Come Join Us!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- Turn Off Ad Banners
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Member Feedback
"...Your site is one of the cleanest and BEST forums that I
have seen. I have sent quite a few people your way. Keep up
the good work!!!"
Geography
Where in the world do Eng-Tips members come from?
|
SolidWorks 3D CAD products FAQ
|
API and Macros
|
IsoViews - All 8 of them
Posted: 24 Feb 03
|
The following macro was found on Comp.Cad.SolidWorks. I am not sure if I really have the right to post it here but I doubt if Mike Wilson will object. I did modify it so that it creates all 8 Iso Views. It can be ran repeatedly so that each view has the correct Zoom value. This macro works with SW2001+ - I have not tried it with SW2003
' ****************************************************** ' ISOViews.swp - Recorded on 12/20/01 by Mike J. Wilson ' ****************************************************** ' Special thanks to Dennis Kelley and Dan Hanger for tips ' Modified to include all 8 Iso Views
Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long Dim Annotation As Object Dim Gtol As Object Dim DatumTag As Object Dim FeatureData As Object Dim Feature As Object Dim Component As Object
Sub main()
Set swApp = CreateObject("SldWorks.Application") Set Part = swApp.ActiveDoc
pi = 4 * Atn(1) Z = Tan(30 * pi / 180) X = Atn(Z / Sqr(-Z * Z + 1)) Y = -45 * pi / 180
Part.DeleteNamedView ("TRF-ISO") Part.DeleteNamedView ("TRR-ISO") Part.DeleteNamedView ("TLF-ISO") Part.DeleteNamedView ("TLR-ISO")
Part.DeleteNamedView ("BRF-ISO") Part.DeleteNamedView ("BRR-ISO") Part.DeleteNamedView ("BLF-ISO") Part.DeleteNamedView ("BLR-ISO")
Part.ShowNamedView2 "*Front", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TRF-ISO")
Part.ShowNamedView2 "*Right", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TRR-ISO")
Part.ShowNamedView2 "*Back", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TLR-ISO")
Part.ShowNamedView2 "*Left", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TLF-ISO")
Part.ShowNamedView2 "*Front", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BRF-ISO")
Part.ShowNamedView2 "*Right", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BRR-ISO")
Part.ShowNamedView2 "*Back", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BLR-ISO")
Part.ShowNamedView2 "*Left", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BLF-ISO") Set Part = Nothing Set swApp = Nothing
End Sub
|
Back to SolidWorks 3D CAD products FAQ Index
Back to SolidWorks 3D CAD products Forum
My FAQ Archive
Email This FAQ To A Friend |
|
 |
|