• 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.

FSX disabled a feature in an existing VC

Messages
371
Country
france
Hello,

In first, thank you very much Arno for MCX.

I try to edit the ehanced B747 virtual cockpit of Alexandro Rojas, to fix some bugs and get new switch functions for a special panel that I coded.

So, there are in this cockpit 2 rotary knobs thant have not the right function. Currently, they switch the display location (PFD / MFD invert there location ) and primary ECAS exchange with secondary EICAS.

I want to assign the GPS/NAV function to the first knob (as written on the panel board) and MFD mode to the second knob.

I loaded in MCX the VC mdl file, and edited the modeldef with the modeldef editor.

First knob part info and animation is linked to a variable called (L;panelSwitch,number) . I changed the code with my new code (part info and animation) A:GPS Drives Nav1 and TOGGLE_GPS_DRIVES_NAV1. I saved the new MDL file.

My new knob function worksfine : GPS / NAV toggle function work with the rotary switch and animation is ok. But the old function of the knob still be active (PFD - MFD screens exchange.
I don't understand, because the old L:vars (L;panelSwitch,number) has disappears of the MDL file (I checked with an hexadecimal editor).
So, that's means that some code is hidden and not accessible ? Is this function (toggle displays) is a FSX function assigned to a mysterious code ? is therean other tools than modeldef editor to access to other code in the MDL file ?

Thanks for your help and sorry for my bad english

François
 
Did you alter the mouse rectangle as well?
 
no. No change in mouse area. I can click on the knob and get my new command but the previous command (exchange PFD/MFD display is still active.
 
So, I ask myself how this function is possible, because gauges location coordinates are declared in panel.cfg file and this function can display PFD at the MFD location and MFD at the PFD location :oops: ......

Image1.jpg

Image2.jpg


???????
 
Last edited:
When you go to the ModelDef Editor in MCX (click that button), what do you see as the code for that modeldef entry?
 
I attached the modeldef.xml file 'with only used function) which comes from the VC that I have edited. I don't see any code that can explain the gauge location exchange....

I changed extension to allow upload.....
 

Attachments

Hello Tom,

This file comes from save function of MCX. I checked, this is exactly the same that I see in MCX, with exactly the same number of line ("only show used" option checked in medeldef editor of MCX).
 
So, I don't think that the solution is in the modeldef file, because I don't know any xml function/comand that allow to swap gauges place by a click action.....no idea ?
 
Inside your modeldef file is this code:

Code:
  <PartInfo>
    <Name>custom_rec_Pan_06</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Panel Switch</TooltipText>
      <CallbackCode>(L:Panelswitch2,number) ! (&gt;L:Panelswitch2,number)</CallbackCode>
    </MouseRect>
  </PartInfo>

This toggles the Panelswitch2 variable from true to false. If the original PFD / MFD gauge is still present, it will still respond to this and flip as it did before.
 
There is 2 knob which have 2 L vars :
- L;Panelswitch ': knob swap MFD/PFD
- L;Panelswitch2 : knob swap the 2 ECAMS

At this time, I just tested to remove code about first knob : L;Panelswitch with no effect. As I said in my previous post, I replaced the code by my own code to get GPS / NAV toggle function. The new code works and L;Panelswitch var is totally deleted of the MDL file ( checked with an hexadecimal editor ) but MFD/PFD still swaps.

I think that the issue is not in the modeldef part because , but I don't know where to search.........
 
It might be in a 2D gauge which swaps the variable anyway. Have you searched all the gauges for Panelswitch2?
 
the 2 vars, "Panelswitch" and "Panelswitch2" don't exist in any xml gauge of the panel....:banghead:

I don't see nowhere a command that can explain display switch :(
 
Hello, :wave:

I found the solution !! :)

I don't change anything in ModelDef editor (besause fail each time). So I decided to use Animation editor , and I found animation which occurs displays swapping and I deleted them with "Fix selected animation".

Now, all is ok; Knobs animations work, and no display swapping and I can keep the 2 L:vars (panelswitch and Panelswitch2) to use with my own gauge code !

Last issue, when I compiled model, I get some error message 'even if I doesn't change anything in the MDL file) :
 

Attachments

  • Image1.jpg
    Image1.jpg
    328.4 KB · Views: 213
Other issue : Display area moved after compilation. PFD goes moved to left and MFD to right !!!

Linked to error message of my previous post ?

Any solution ?
 

Attachments

  • Image1.jpg
    Image1.jpg
    110.7 KB · Views: 200
  • Image2.jpg
    Image2.jpg
    315.7 KB · Views: 221
Hello,

All work now. I used now the "Object Hierarchy" tools in MCX, to disabled displays animation by assign "None" type. And now all is ok : No swapping Diplay, gauge displays aligned with VC location, Knobs animation work and I can use knobs L:Vars with my new code and create my new PFD /MFD/EICAS gauges..

Sorry for the inconvenience
 

Attachments

  • Image1.jpg
    Image1.jpg
    372.2 KB · Views: 193
Back
Top