DraftSight API programming C#

When the project starts with an example for C # of IPA (Construct 2D PolyLine (C #))

 Code:

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

 

exception:

HRESULT: 0x800401E3 (MK_E_UNAVAILABLE)) 

 

Why?