Layer on/off macro

Discussion in 'SolidWorks' started by jakemjones, Sep 5, 2007.

  1. jakemjones

    jakemjones Guest

    I run script files to turn on/off layers in drawings in batches.
    This is done to alert the users of the drawings that the drawing is
    currently in a process such as an ECR.
    I want to do this in SolidWorks, but cannot get the macro recorder to
    work.
    I press record and go through the steps of opening the layer manager,
    turning the layer on that want on, closing and saving, then stoping
    the macro. When I run this macro in a drawing, nothing happens.

    Any help would be great!

    Thanks
    Jake
     
    jakemjones, Sep 5, 2007
    #1
  2. jakemjones

    fcsuper Guest

    Jake,

    I would instead refer to the SolidWorks API Help to find the functions
    that addresses layers. From your description of the steps you have
    taken, I'm guessing you've never edited or created a macro. Try
    opening up existing ones to see how they tick. There's plenty at
    http://www.lennyworks.com, http://sw.fcsuper.com (my site) and
    http://mysite.verizon.net/mjlombard. Also, I recommend getting the
    book "Automating SOLIDWORKS 2006 using MACROS".

    Matt Lorono
    http://sw.fcsuper.com
    http://tech.groups.yahoo.com/group/solidworks
    http://astore.amazon.com/itstro-20/detail/1585032638/102-6087577-4545702
    (This is my amazon store link for the SW 2006 Macro book, but I don't
    really expect anyone to buy directly from it. However, I invite anyone
    to look around the store to get some ideas for books to buy.)
     
    fcsuper, Sep 6, 2007
    #2
  3. jakemjones

    jakemjones Guest

    Thanks Matt!
    I will begin down that path!

    Jake
     
    jakemjones, Sep 7, 2007
    #3
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.