Machsupport Forum
Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: db1 on June 22, 2015, 05:22:05 PM
-
Hello all,
I created a simple vb.net application that generates a gcode file for some simple shapes. After the file is created the user can click a button that is used to load the gcode into mach3 (This is just for convenience for the user) but when the button is clicked vb throws the following error :
An unhandled exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll
Additional information: Cannot create ActiveX component
Can anyone help interpret and fix this error? I have done a few google searches and was able to find threads with the same problem but none of the ones I found were answered.
Thank you for any help!
Below is the vb.net code that I use:
Dim mach As Mach4.IMach4
Dim scriptObject As Mach4.IMyScriptObject
mach = GetObject(, "Mach4.Document") <------- This is the line the error happens at
scriptObject = mach.GetScriptDispatch()
scriptObject.LoadFile(Filename)