Is there a macro out there that...

Discussion in 'SolidWorks' started by danferes, Feb 3, 2005.

  1. danferes

    danferes Guest

    Hi Ben,
    Here you are my macro.
    Whit it you can:
    ..- Put your model or assy in ISO view
    ..- Zoom to fit
    ..- Rebuild
    ..- Save

    Bye, Danferes



    **********************************************************************
    Dim swApp As Object
    Dim CurrentDoc As Object
    Dim swModel As SldWorks.ModelDoc2


    Sub main()

    Set swApp = CreateObject("SldWorks.Application")
    Set swModel = swApp.ActiveDoc
    Set swApp = Application.SldWorks
    Set CurrentDoc = swApp.ActiveDoc


    swModel.ShowNamedView2 "*Isometric", -1
    swModel.ViewZoomtofit2 ' zoom to fit
    CurrentDoc.EditRebuild ' rebuild doc
    CurrentDoc.Save2 False ' save doc

    swApp.QuitDoc swModel.GetTitle

    End Sub
    *******************************************************************
     
    danferes, Feb 3, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.