1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

c# ObjectAdded and ObjectRemoved

Discussion in 'SimConnect' started by flying-w, 6/9/07.

  1. flying-w

    flying-w

    Joined:
    5/9/07
    Messages:
    42
    Country:
    wales
    Does anyone have the ObjectAdded and ObjectRemoved events working in a c# app? I can make them work in c++, but I never called in c#. Other system events to work.

    Here's the code:
    _simconnect.SubscribeToSystemEvent(AI_AIRCRAFT_LIFE_EVENTS.ADDED, "ObjectAdded");
    _simconnect.SubscribeToSystemEvent(AI_AIRCRAFT_LIFE_EVENTS.REMOVED, "ObjectRemoved");
    _simconnect.SubscribeToSystemEvent(AI_AIRCRAFT_LIFE_EVENTS.TEST, "4sec");

    I get a call back every 4 seconds so the infrastructure is good, but never when FSX adds or removes an AI aircraft.

Share This Page