CreateImageByExtension Exception
Posted: 18 May 2018, 17:51
I'm getting an exception when calling CreateImageByExtension
CADImport.CADImage cadImage = CADImage.CreateImageByExtension(filename);
System.InvalidOperationException: 'Cross-thread operation not valid: Control 'MainForm' accessed from a thread other than the thread it was created on.'
I'm calling CreateImageByExtension in a Task returned from an async method. I have a MainForm in my project, but I also see the text "MainForm" in CadImport.xml.
Any ideas?
CADImport.CADImage cadImage = CADImage.CreateImageByExtension(filename);
System.InvalidOperationException: 'Cross-thread operation not valid: Control 'MainForm' accessed from a thread other than the thread it was created on.'
I'm calling CreateImageByExtension in a Task returned from an async method. I have a MainForm in my project, but I also see the text "MainForm" in CadImport.xml.
Any ideas?