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
"...I have to add my thanks and appreciation for your wonderful site... People who frequent the site are the two best things - nice and smart..."
Geography
Where in the world do Eng-Tips members come from?
|
SolidWorks 3D CAD products FAQ
|
API and Macros
|
Creates 8 ISO Views
Posted: 1 Nov 05
|
This is an update to the macro originally posted. 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 SWx2005 - I have not tried it with SWx2006
' ****************************************************** ' ISOViews.swp – Recorded on 12/20/01 by Mike J. Wilson ' ISOViews.swp – Updated on 6/7/05 by Heckler ' ******************************************************
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
Set swApp = Application.SldWorks 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 |
|
 |
|