I need a Macro

Discussion in 'SolidWorks' started by anil, Feb 21, 2007.

  1. anil

    anil Guest

    Hi every body,

    I need a macros with following functionality


    1) need to uncheck all the tabs in View pulldown menu except "Hide
    all
    types"


    2) Need to hide all the userdefined Planes.


    Please help me out....
     
    anil, Feb 21, 2007
    #1
  2. anil

    fcsuper Guest

    fcsuper, Feb 21, 2007
    #2
  3. anil

    bagarnx Guest

    Search for "ModelDoc2::SetUserPreferenceToggle" in the SolidWorks API-
    help.

    Here's a little macro to show you how to use it.
    I copy/pasted it, 'cause I can't seem to find an attach button here.
    Not possible to attach files here??

    ------------------------------------------------
    Dim swApp As Object
    Dim Part As Object
    Dim boolstatus As Boolean

    Sub main()

    Set swApp = Application.SldWorks
    Set Part = swApp.ActiveDoc

    boolstatus = Part.SetUserPreferenceToggle(swViewDisplayHideAllTypes,
    True)

    End Sub
    ------------------------------------------------
     
    bagarnx, Feb 21, 2007
    #3
  4. anil

    Chris Dubea Guest

    Also be aware that not all of the display types are controllable.
    ===========================================================================
    Chris
     
    Chris Dubea, Feb 21, 2007
    #4
  5. anil

    CS Guest

    Try recording a macro. I tried it and got all the calls needed to do
    what you are asking.

    Bagarnx there are no attachments on this NG
     
    CS, Feb 22, 2007
    #5
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.