THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/07/2004 at 19:36, xxxxxxxx wrote:
Mikael,
I tried to create a simple menu plugin with the sample code you have given. But still I cannot see the animation. At the same time, creation of visibility track and parameters are okay. Here is the code that I used, and I am using XL V7.303
// Testing Plug-in ID...
var PLUGIN_ID = 999999;
class mnuAnimation: MenuPlugin
{
public:
mnuAnimation();
GetID();
GetName();
GetHelp();
Execute(doc);
}
mnuAnimation::mnuAnimation()
{
super();
}
mnuAnimation::GetID()
{
return PLUGIN_ID;
}
mnuAnimation::GetName()
{
return "Animate";
}
mnuAnimation::GetHelp()
{}
mnuAnimation::Execute(doc)
{
//Sample code from Mikael...
var obj = doc->GetFirstObject();
var track = new(VisibilityTrack);
var seq = new(VisibilitySequence);
var key = new(VisibilityKey);
var bc = key->GetContainer();
bc->SetData(VISIBILITYKEY_VALUE, 0);
key->SetContainer(bc);
seq->InsertKey(key);
track->InsertSequence(seq);
obj->InsertTrack(track);
GeEventAdd(DOCUMENT_CHANGED);
doc->AnimateDocument(ANIMATE_QUICK);
}
main()
{
Register(mnuAnimation);
}
When I call run this, nothing is happening in the time palette. In fact, the time bar should start to move right, which is not happening...
Looking forward your help...