public bool DisconnectFromSW() { Addin = null; RemoveLogPage(); GC.Collect(); return(true); }
public bool ConnectToSW(object ThisSW, int Cookie) { swApp = (SldWorks)ThisSW; Addin = this; swCookie = Cookie; System.Diagnostics.Debug.Print("Successfully loaded Open Log Page"); bool result = swApp.SetAddinCallbackInfo(0, this, Cookie); AddLogPage(); LogPage.WriteLine("Connected to Solidworks", new wpfLogPageEntry.logEntryType { msgColor = System.Windows.Media.Colors.Green, msgPrefix = "[OLP]" }); return(true); }