Hide/Show marco for parts in a assembly

Discussion in 'SolidWorks' started by Jan Derk, Apr 19, 2004.

  1. Jan Derk

    Jan Derk Guest

    Hello all,

    The company I work for builds machinery which consist of several
    modules. Modules needed depend on the customer needs. At the
    salesoffice, a drawing is made which shows a simplified layout of the
    machine. In the engineering office this drawing is used to make a
    correct representation of the machine.
    For each drawing a 3D model of the machine is build consisting of
    simplified versions of each module. Each module is a assembly with one
    or more parts in it. Some of the assemblys also contain a part with
    the text 'WEB' in the filename. For clearity, these parts have to be
    visible or hidden when creating the machine model from seperate
    modules.

    What I need is a macro that can do the following:

    - Search for all part with 'WEB' in the filename.
    - If these parts are hidden, then make then visible.
    - If these parts are visible, then make them hidden
    - The marco should work in an assembly and in a drawing.

    Please help.

    Regards,

    Jan Derk Remmers
     
    Jan Derk, Apr 19, 2004
    #1
  2. If you have a basic knowledge of VB programming, visit
    http://www.solidworks.com/pages/services/CodeExamples.html
    and get one of these samples as a good starting point:
    - How to show all components in an assembly
    - How to show only the selected components in an assembly
    You will need 2 minutes of work from there to do the job.
    will require 3 more minutes...

    I might do it for you if I can find 5 mins, or if you have some money (email
    me)...
     
    Philippe Guglielmetti, Apr 19, 2004
    #2
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.