Using Run Process in a script you can execute PCB commands.
I created a Delphi script which was running properly in both 2D and 3D modes with older versions of DXP (before AD18). After DXP migrated to 64bit the script would only run when the PCB was in the 2D view. I needed to add line of code to my script to switch from the 3D view to 2D.
Recently I learned to use RunProcess to execute PCB Commands in my scripts.
Example: To switch the PCB from 3D view to 2D view.