• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

AI aircraft in managed code

Messages
6
Country
us-newmexico
I am attempting to create an AI aircraft in managed code (VB.NET).
The "create" process is straightforward:

fsxSimConnect.AICreateNonATCAircraft("Mooney Bravo", "N1701", InitPos, DataRequestID7.REQUESTMOONEY)
fsxSimConnect.RequestDataOnSimObjectType(DataRequestID7.REQUESTMOONEY, DefineID.ID1, 0, Microsoft.FlightSimulator.SimConnect.SIMCONNECT_SIMOBJECT_TYPE.AIRCRAFT)


BUT... I need the objectID for the Mooney to use when setting waypoints, etc. and I am having trouble getting this information back from SimConnect. I have tried to set up an event handler of the type:

AddHandler fsxSimConnect.OnRecvAssignedObjectId

However, there doesn't seem to be a matching SimConnect event which has the correct matching signature. The closest I can find is:

SimConnect.RecvAssignedObjectIdEventHandler(AddressOf fsxSimConnect_OnRecvSimobjectDataBytype)

and Visual Studio is complaining that the signature on this function doesn't match the OnRecvAssignedObjectId signature.

Any assistance would definitely be appreciated.

Thanx

Tom
 
FlapsOut reply

Hi Tom,

Search on posts by FlapsOut...we've examined and detailed much of this, including source-code :)

Flaps ;)
 
Thanx for the reply. I have gotten past this question, and have hit another snag. I am getting a SimConnect Exception 3 when I try to send an array of waypoints. I have done the search on FlapsOut as you suggested, but there are very few code samples, and none I saw relate to waypoints. Could you provide a pointer, please?

Regards

Tom
 
Last edited:
Thomas

um...If you wanna send me some source? I'll be more than happy to figure out where the Booger is.

I'm a Pro, so I keep everything sent to me privately as Confidential...

If anyone asks? I already lost the source you sent me, k?

Remember, We talking C# and .Net here? For C++ or 'C' or even Java? We got other very good experts available here :)

Thanks,
Flaps
 
Back
Top