Animating Light

Discussion in 'SolidWorks' started by Jacob Filek, Feb 26, 2004.

  1. Jacob Filek

    Jacob Filek Guest

    Is it possible to animate a light source moving in an assembly?
     
    Jacob Filek, Feb 26, 2004
    #1
  2. Yes, check it out. All you need is this bad-ass M.F....
    http://www.mikejwilson.com/solidworks/solidworks_files.htm

    That's short for Macro Feature of course!

    *) Open the assembly
    *) Drag the light fixture shade a little bit
    *) Hit CTRL-Q

    You will see the spot light re-direct itself accordingly.
    It's not "real time" unfortunately, but it's good enough for
    animations.

    You can edit the Macro Feature to do many lights as
    well as different kinds.

    Here is a sample anime...
    http://www.mikejwilson.com/misc/associative_lights.zip

    Mike Wilson
     
    Mike J. Wilson, Feb 26, 2004
    #2
  3. Jacob Filek

    Jacob Filek Guest

    Mike:

    How do I edit the macro feature?

    Jacob


     
    Jacob Filek, Feb 26, 2004
    #3
  4. Jacob Filek

    Jacob Filek Guest

    for that matter how do i insert a macro feature into my assy?
     
    Jacob Filek, Feb 26, 2004
    #4
  5. In the original ZIP file you downloaded from my site, there
    is a regular macro file. This is what you edit. The Macro
    Feature in the assembly references this file.

    When you edit the macro, there are some brief instructions
    to get you started.

    Mike Wilson
     
    Mike J. Wilson, Feb 26, 2004
    #5
  6. Well, if the macro is written properly, all you need to do
    is run it and it will insert the Macro Feature, 'feature' into
    the Feature Manager.

    Since I'm not a macro expert, it took me many hours of trial
    and error as well as help from this NG to get it working.

    I haven't tested it in 2004, so there may be some glitches
    there. I just tried to run it and got an error. Probably a
    minor fix.

    Mike Wilson
     
    Mike J. Wilson, Feb 26, 2004
    #6
  7. Jacob Filek

    Jacob Filek Guest

    i'm trying it in 2004 and get an error at the line: "Set Doc =
    swApp.ActiveDoc"
     
    Jacob Filek, Feb 26, 2004
    #7
  8. Hmm, not sure what's going on. For now you can remove
    the line "Option Explicit" and re-save the macro. This
    should allow you to run it.

    I won't have the time to de-bug it for the time being.
    Maybe one of our API Superheroes can help? Like I
    mentioned, my macros skills are pretty rusty so any
    advice, new additions, improvements would be warmly
    welcomed.

    Maybe you can start a new API thread to help get you
    the features you need in your animation macro? That
    way you can grab the attention of the API people (they
    might ignore this thread).

    Mike Wilson
     
    Mike J. Wilson, Feb 26, 2004
    #8
  9. Jacob Filek

    Jacob Filek Guest

    Thanks Mike.


     
    Jacob Filek, Feb 26, 2004
    #9
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.