User avatar
By b-kandor
#265961
It seems like this might be possible now? When I looked at the sw2008 object model I found no control for controlling frame by frame advancement of the animation. Maybe 2008 has changed?
By JDHill
#265969
I think the only interface for animation now is Motion Studies, i.e. the API docs for the regular SW animation feature say:
Animation Object
This interface is:

obsolete and has not been superseded.

nonfunctional in SolidWorks 2008 and later.

Use the interfaces related to motion studies introduced in SolidWorks 2008 to access animation and simulation.
This doesn't appear to be too useful though, since the only types of commands available in motion studies appear to be start/stop kinds of things - basically just exposing control to those buttons in the UI. But then, I think it was no different with the older animation APIs. I've thought, it might be possible to create a hack, where you would start and then stop the motion study every n-milliseconds and export an .mxs using the plugin's scripting object from VBA. At this point, something like that looks to be the only option - there are (afaik) no API events or callbacks that a plugin (or a macro) can listen to in order to tell when the frame is being advanced.

JD
User avatar
By b-kandor
#265972
thanks JD,

I'm going to need to figure something out by next friday by the looks of it.... so I'll start experimenting.
By JDHill
#265997
In looking into this, I found that the 1.6.6 installer breaks the Maxwell.Script connection by creating one extra registry entry. You can download this .zip and run the Maxwell.Script_fix.reg file to fix it. I'm not sure if it will help much though - even though the docs have examples for accessing motion studies, I haven't yet been able to actually find the types they use in the SolidWorks type libraries. I'm still on 2008 SP0.0, so maybe they were not ready for the initial release or something. Let me know if you are seeing the same thing, because if I can prototype some hack way of using motion studies with the plugin's BeginAnimation and EndAnimation functions, I'll put it into the plugin.
Sketchup 2024 Released

I would like to add my voice to this annual reques[…]