当前位置: 首页 > wzjs >正文

百度关键词搜索技巧seo在线教程

百度关键词搜索技巧,seo在线教程,天津企业网站建设一般多少钱,竞价托管服务公司今天给大家讲一讲solidworks中各种菜单界面,如下图,大概有13处,也许还不完整哈。 1.CommandManager选项卡2.下拉选项卡3.菜单栏4.下级菜单5.浮动工具栏6.快捷方式工具栏7.FeatureManager工具栏区域8.MontionManager区域 ModelView?9.任务窗…

今天给大家讲一讲solidworks中各种菜单界面,如下图,大概有13处,也许还不完整哈。

  • 1.CommandManager选项卡
  • 2.下拉选项卡
  • 3.菜单栏
  • 4.下级菜单
  • 5.浮动工具栏
  • 6.快捷方式工具栏
  • 7.FeatureManager工具栏区域
  • 8.MontionManager区域 ModelView?
  • 9.任务窗格
  • 10.前导视图工具栏
  • 11.定制三方工具条
  • 12.PMP界面
  • 13.右键菜单
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
我们来看一下每个方式的创建方式及核心代码:
1+3+5.
CommandManager选项卡上 + 菜单栏

  				//菜单List<int> cmdIndexs = new List<int>();//API提示的信息有误//第一个参数是菜单里面的名称//第三个参数是提示信息//第四个参数是工具条上的名称var tempCmdIndex1 = cmdGroup.AddCommandItem2("Cmd1", -1, "Cmd Tooltip1", "Cmd-1", 0, $"FunctionProxy({mainItemIds[0]})", $@"EnableFunction({mainItemIds[0]})", mainItemIds[0], menuToolbarOption);var tempCmdIndex2 = cmdGroup.AddCommandItem2("Cmd2", -1, "Cmd Tooltip2", "Cmd-2", 1, $"FunctionProxy({mainItemIds[1]})", $@"EnableFunction({mainItemIds[1]})", mainItemIds[1], menuToolbarOption);var tempCmdIndex3 = cmdGroup.AddCommandItem2("Cmd3", -1, "Cmd Tooltip3", "Cmd-3", 2, $"FunctionProxy({mainItemIds[2]})", $@"EnableFunction({mainItemIds[2]})", mainItemIds[2], menuToolbarOption);cmdIndexs.Add(tempCmdIndex1);cmdIndexs.Add(tempCmdIndex2);cmdIndexs.Add(tempCmdIndex3);cmdGroup.HasToolbar = true; //(浮动工具栏)cmdGroup.HasMenu = true;//(菜单栏)cmdGroup.Activate();//增加到工具条,是通过每个文档对象来增加的。 比如零件 装配 工程图bool bResult;foreach (int type in docTypes){CommandTab cmdTab;cmdTab = iCmdMgr.GetCommandTab(type, Title);//如果已经存在,并且id命令有变化,需要移除之后 ,重新增加。if (cmdTab != null & !getDataResult && ignorePrevious){bool res = iCmdMgr.RemoveCommandTab(TabToRemove: cmdTab);cmdTab = null;}//工具栏为空时,重新增加if (cmdTab == null){cmdTab = iCmdMgr.AddCommandTab(type, Title);CommandTabBox cmdBox = cmdTab.AddCommandTabBox();List<int> cmdIDs = new List<int>();//工具栏样式,List<int> showTextType = new List<int>();for (int i = 0; i < cmdIndexs.Count; i++){cmdIDs.Add(cmdGroup.get_CommandID(i));showTextType.Add((int)swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow);}//把下拉式工具栏加到菜单里。cmdIDs.Add(flyGroup1.CmdID);showTextType.Add((int)swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow);cmdIDs.Add(flyGroup2.CmdID);showTextType.Add((int)swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow);bResult = cmdBox.AddCommands(cmdIDs.ToArray(), showTextType.ToArray());CommandTabBox cmdBox1 = cmdTab.AddCommandTabBox();//这个是加分割线,记得从后往前,因为分割后最前的id集变少了。//cmdTab.AddSeparator(cmdBox1, cmdIDs[0]);}}

在这里插入图片描述
工具栏上的下拉+快捷方式工具栏

在这里插入图片描述

FlyoutGroup flyGroup1 = iCmdMgr.CreateFlyoutGroup2(flyoutGroupID1, "FlyoutGroup1", "可下拉1", "工具栏说明",cmdGroup.MainIconList, cmdGroup.IconList, $"FlyoutCallback(6000)", "FlyoutEnable");flyGroup1.FlyoutType = (int)swCommandFlyoutStyle_e.swCommandFlyoutStyle_Simple;var addResult = flyGroup1.AddContextMenuFlyout((int)swDocumentTypes_e.swDocPART, (int)swSelectType_e.swSelFACES);FlyoutGroup flyGroup2 = iCmdMgr.CreateFlyoutGroup2(flyoutGroupID2, "FlyoutGroup2", "可下拉2", "工具栏说明2",cmdGroup.MainIconList, cmdGroup.IconList, $"FlyoutCallback(7000)", "FlyoutEnable");flyGroup2.FlyoutType = (int)swCommandFlyoutStyle_e.swCommandFlyoutStyle_Simple;public void FlyoutCallback(int gId){if (gId==flyoutGroupID1){FlyoutGroup flyGroup1 = iCmdMgr.GetFlyoutGroup(gId);flyGroup1.RemoveAllCommandItems();flyGroup1.AddCommandItem("AAA", "test", 0, $"FlyoutCommandItem1({gId+1})", $"FlyoutEnableCommandItem1({gId+1})");flyGroup1.AddCommandItem("BBB", "test", 0, $"FlyoutCommandItem1({gId+2})", $"FlyoutEnableCommandItem1({gId+2})");flyGroup1.AddCommandItem("CCC", "test", 0, $"FlyoutCommandItem1({gId+3})", $"FlyoutEnableCommandItem1({gId+3})");}if (gId == flyoutGroupID2){FlyoutGroup flyGroup2 = iCmdMgr.GetFlyoutGroup(gId);flyGroup2.RemoveAllCommandItems();flyGroup2.AddCommandItem("XXX", "test", 0, $"FlyoutCommandItem1({gId + 1})", $"FlyoutEnableCommandItem1({gId+1})");flyGroup2.AddCommandItem("YYY", "test", 0, $"FlyoutCommandItem1({gId + 2})", $"FlyoutEnableCommandItem1({gId+2})");}if (gId==7000){SwApp.SendMsgToUser("id==7000");}}

4.下级菜单

在这里插入图片描述

            var cmdGroupSub = iCmdMgr.CreateCommandGroup2(mainSubCmdGroupID, $"Addin Study\\SubMenu", ToolTip, "", -1, ignorePrevious, ref cmdGroupErr);cmdGroupSub.MainIconList = mainIcons;cmdGroupSub.IconList = icons;cmdGroupSub.AddCommandItem2($@"SubCmd4", -1, "Cmd Tooltip4", "Cmd-4", 2, $"FunctionProxy({mainItemIds[2]})", $@"EnableFunction({mainItemIds[2]})", mainItemIds[2], menuToolbarOption);cmdGroupSub.Activate();

在这里插入图片描述

    #region 工具菜单栏下面显示新菜单项var menuId = iSwApp.AddMenuItem5((int)swDocumentTypes_e.swDocPART, addinCookieID, "子菜单1@新菜单1", 0, "FlyoutCallback(7000)", "FlyoutEnable", "My menu item", icons);var menuId2 = iSwApp.AddMenuItem5((int)swDocumentTypes_e.swDocPART, addinCookieID, "子菜单3@子菜单2@新菜单1", 0, "FlyoutCallback(7000)", "FlyoutEnable", "My menu item", icons);var menuId3 = iSwApp.AddMenuItem5((int)swDocumentTypes_e.swDocPART, addinCookieID, "子菜单4@Addin Study", 0, "FlyoutCallback(7000)", "FlyoutEnable", "My menu item", icons);#endregion

8.ModelView

            IModelDoc2 pDoc;pDoc = (IModelDoc2)iSwApp.ActiveDoc;IModelViewManager swModelViewMgr;swModelViewMgr = pDoc.ModelViewManager;ModelView1Control = new UserControl1();swModelViewMgr.DisplayWindowFromHandlex64("用户控件1", ModelView1Control.Handle.ToInt64(), false);

9.任务窗格

            ITaskpaneView pTaskPanView;pTaskPanView = iSwApp.CreateTaskpaneView2("", "我的窗口");TaskPanWinFormControl = new Form1();pTaskPanView.DisplayWindowFromHandlex64(TaskPanWinFormControl.Handle.ToInt64());

10.前导视图工具栏 未找到接口
11.
在这里插入图片描述
在这里插入图片描述

 #region 新上下文菜单IFrame frame = (IFrame)SwApp.Frame();var imgPath1 = $@"{RegDllPath()}\icons\Pic1 (1).png";var imgPath2 = $@"{RegDllPath()}\icons\Pic1 (2).png";var imgPath3 = $@"{RegDllPath()}\icons\Pic1 (3).png";var imgPath4 = $@"{RegDllPath()}\icons\Pic1 (4).png";var imgPath5 = $@"{RegDllPath()}\icons\Pic1 (5).png";var imgPath6 = $@"{RegDllPath()}\icons\Pic1 (6).png";var resultCode = frame.AddMenuPopupIcon2((int)swDocumentTypes_e.swDocPART, (int)swSelectType_e.swSelNOTHING, "新上下文菜单", addinCookieID, "PopupCallbackFunction", "PopupEnable", "", imgPath1);// create and register the third party menu 创建并注册第三方组菜单registerID = SwApp.RegisterThirdPartyPopupMenu();// add a menu break at the top of the menu  在组菜单最上方增加一个不能点击的菜单resultCode = SwApp.AddItemToThirdPartyPopupMenu2(registerID, (int)swDocumentTypes_e.swDocPART, "我的菜单", addinCookieID, "", "", "", "", "", (int)swMenuItemType_e.swMenuItemType_Break);// add a couple of items to to the menu   增加菜单内的命令集resultCode = SwApp.AddItemToThirdPartyPopupMenu2(registerID, (int)swDocumentTypes_e.swDocPART, "命令测试1", addinCookieID, "FlyoutCallback(7000)", "FlyoutEnable", "", "Test1", imgPath2, (int)swMenuItemType_e.swMenuItemType_Default);resultCode = SwApp.AddItemToThirdPartyPopupMenu2(registerID, (int)swDocumentTypes_e.swDocPART, "命令测试2", addinCookieID, "FlyoutCallback(7000)", "FlyoutEnable", "", "Test4", imgPath3, (int)swMenuItemType_e.swMenuItemType_Default);// add a separator bar to the menu  增加分割线resultCode = SwApp.AddItemToThirdPartyPopupMenu2(registerID, (int)swDocumentTypes_e.swDocPART, "", addinCookieID, "", "", "", "", "", (int)swMenuItemType_e.swMenuItemType_Separator);//继续增加个命令resultCode = SwApp.AddItemToThirdPartyPopupMenu2(registerID, (int)swDocumentTypes_e.swDocPART, "命令测试3", addinCookieID, "FlyoutCallback(7000)", "FlyoutEnable", "", "Test5", imgPath4, (int)swMenuItemType_e.swMenuItemType_Default);// add an icon to the menu bar  给菜单条上面再加图标按钮resultCode = SwApp.AddItemToThirdPartyPopupMenu2(registerID, (int)swDocumentTypes_e.swDocPART, "", addinCookieID, "FlyoutCallback(7000)", "FlyoutEnable", "", "NoOp", imgPath5, (int)swMenuItemType_e.swMenuItemType_Default);#endregion
  1. PMP界面–请参考插件里的CreatePropertyManagerPage
  2. 对象的右键菜单
    在这里插入图片描述
  #region 右键菜单//右键菜单 (好像没看到图标的定义方式)  --选中草后 右键显示var popItem1 = SwApp.AddMenuPopupItem4((int)swDocumentTypes_e.swDocPART, addinCookieID, "ProfileFeature", "右键菜单","FlyoutCallback(7000)", "FlyoutEnable", "我的右键菜单", "");SwApp.AddMenuPopupItem4((int)swDocumentTypes_e.swDocPART, addinCookieID, "ProfileFeature", "子菜单For草图@右键子菜单","FlyoutCallback(7000)", "FlyoutEnable", "子菜单@右键菜单", "");#endregion

上面是我收集的到一些关于solidworks中二次开发里常用的一些增加自己的菜单或者命令的办法,当然也可能不是太准确。希望对大家有帮助。
代码还是保持开源风格,各位家人们自取
在这里插入图片描述

https://gitee.com/painezeng/SolidWorksAddinStudy

http://www.dtcms.com/wzjs/499758.html

相关文章:

  • 课程网站建设论文线上销售方案
  • 企业网站建设北京公司排名如何做好精准营销
  • 代理平台有哪些seo服务公司上海
  • 平台类网站建设价格表长沙网络推广只选智投未来
  • 做模具做什么网站抖音广告推广怎么收费
  • 网站备案信息注销原因怎么搜索关键词
  • 音乐网站可做哪些内容创建网站
  • 内容展示型网站特点小程序怎么引流推广
  • 外贸免费建设网站苏州网站建设书生商友
  • 企业网站建设哪家seo刷关键词排名优化
  • 辽阳企业网站建设费江门网站定制多少钱
  • 哈尔滨网站搜索优化公司seo推广绩效考核指标是什么
  • 设计logo网站免费奇米网络营销的推广方式都有哪些
  • wap视频网站建设难吗?中国进入全国紧急状态
  • 商场网站建设百度推广app下载
  • 福州短视频seo排行seo入门教学
  • 陕icp网站建设什么是sem
  • 网站设计师培训排位及资讯
  • 漳浦网站制作抖音推广网站
  • 建设银行甘肃分行网站怎么创作自己的网站
  • 北京模板网站建设费用优化公司流程制度
  • 网站制作公司哪家专业外贸平台app
  • 平台网站模板素材图片下载深圳最新通告今天
  • 公司网页是什么网站建设seo优化培训
  • 电脑管理软件排行榜seo系统教程
  • 枞阳网站制作站长之家源码
  • 达州网站建设的公司seo研究中心道一老师
  • 微信网站开发怎么做陕西新闻今日头条
  • en blog wordpress宁波seo推广方式排名
  • 做网站一般注意些什么腾讯企点官网下载