Is it possible to get data directly from d-cards in MODE?

In a MODE script, I used copydcard to save mode profiles to the deck. Is there a way to later pull data (e.g., electric field data for plotting) from the named d-card using script commands?

Yes, it is possible by using getdata command.

I have β€œtest_mode1” in my deck:

will return all objects with available data in my FDE simulation. I can see that besides the modes in the mode list, I have also β€œ::test_mode1” object at my disposal:

Then I can inquiry what type of data are within this object:

which returns:

surface_normal  dimension  f  neff  loss  TE polarization fraction  waveguide TE/TM fraction  x  y
z  Ex  Ey  Ez  Hx  Hy  Hz  Z0  

Hence, if I wish to get Ex from the mode in my deck, I use the following command:

and the Ex matrix will be available in my script workspace now: