public bool ConnectToSW(object ThisSW, int Cookie) { mSWApplication = (SldWorks)ThisSW; mSWCookie = Cookie; mCommandGroupId = mCommandGroupId_0; plugin_count_id = mCommandGroupId; mCommandManager = mSWApplication.GetCommandManager(mSWCookie); bool result = mSWApplication.SetAddinCallbackInfo(0, this, mSWCookie); this.UISetup(); return(result); }
public CommandManager(SldWorks iSwApp) { this.iSwApp = iSwApp; this.iCmdMgr = iSwApp.GetCommandManager(SwAddin.addinID); SetupCommands(); }