Draftsight API / Options

The Task: Automatic Setup of System Options/Print Settings for all users with no input on their side.

I have two options, but with both I seem to have meet an dead end:


Option A: Running of a Batch file, that starts a script.

Batch: [taskkill /im DraftSight.exe /f

cmd /c start "" "C:\\Program Files\\Dassault Systemes\\DraftSight\\bin\\DraftSight.exe" /b "X:\\Filepath\\configuration.scr" /w]

Script: [_SystemOptions]

Is there a possibility to navigate paths, and change options with the script inside the System Options?


Option B: Programming a .exe in C#

Starting this according to the API:

https://help.solidworks.com/2024/english/api/draftsightapi/Change_Colors_of_User-interface_Elements_Example_CSharp.htm?

But the .Marshal in Line 10 seems not to be supported anymore, therefore I fail to implement Draftsight into the C# Code.

dsApp = (DraftSight.Interop.dsAutomation.Application)Marshal.GetActiveObject("DraftSight.Application");


Is there an Option C I am missing? Or can you give me advice how to proceed further on Option A or B?

Best Regards