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

西部数码网站打不开网站管理与维护方案

西部数码网站打不开,网站管理与维护方案,商丘做网站的哪家好,浙江网城建设有限公司大家好#xff0c;今天要讲的一些API是关于实体的相关API。 在开发的过程#xff0c;很多地方会涉及到实体的相关操作#xff0c;比如通过实体选中节点。下面就直接开始介绍API#xff1a; #xff08;1#xff09;第一个API为Select4#xff0c;这个API的含义为选中一…大家好今天要讲的一些API是关于实体的相关API。 在开发的过程很多地方会涉及到实体的相关操作比如通过实体选中节点。下面就直接开始介绍API 1第一个API为Select4这个API的含义为选中一个实体下面是API的官方解释 输入参数有两个第一个为ISelectData第二个为布尔值。 返回值只有一个成功选中会返回true失败会返回false。 下面是官方使用的例子 This example shows how to get data for an offset surface. //---------------------------------------------------------------------- // Preconditions: // 1. Open an assembly document that contains a component that //    has a surface offset feature. // 2. Select the components surface offset feature. // 3. Open the Immediate window. // // Postconditions: Inspect the Immediate window. //---------------------------------------------------------------------- using Microsoft.VisualBasic; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Diagnostics; using SolidWorks.Interop.sldworks; using SolidWorks.Interop.swconst; using System.Runtime.InteropServices; namespace AnalyzeOffsetSurface_CSharp.csproj {     partial class SolidWorksMacro     {         public void Main()         {             ModelDoc2 swModel default(ModelDoc2);             SelectionMgr swSelMgr default(SelectionMgr);             SelectData swSelData default(SelectData);             SurfaceOffsetFeatureData swOffset default(SurfaceOffsetFeatureData);             Feature swFeat default(Feature);             Entity swEnt default(Entity);             object[] vFace null;             int i 0;             bool bRet false;             Component2 comp default(Component2);             Component2 swCompFace default(Component2);             swModel (ModelDoc2)swApp.ActiveDoc;             swSelMgr (SelectionMgr)swModel.SelectionManager;             swSelData (SelectData)swSelMgr.CreateSelectData();             swFeat (Feature)swSelMgr.GetSelectedObject6(1, -1);             swOffset (SurfaceOffsetFeatureData)swFeat.GetDefinition();             comp (Component2)swSelMgr.GetSelectedObjectsComponent3(1, -1);             Debug.Print(File swModel.GetPathName());             Debug.Print(CompFeature comp.Name2);             Debug.Print(   swFeat.Name);             Debug.Print(    Distance       swOffset.Distance * 1000.0 mm);             Debug.Print(    Flip           swOffset.Flip);             Debug.Print(    FacesCount     swOffset.GetEntitiesCount());             bRet swOffset.AccessSelections(swModel, comp);             swModel.ClearSelection2(true);             vFace (object[])swOffset.Entities;             for (i 0; i vFace.GetUpperBound(0); i)             {                 swEnt (Entity)vFace[i];   Debug.Print( Entity selected swEnt.Select4(true, null)); swCompFace (Component2)swEnt.GetComponent();                 Debug.Print(    Component face  swCompFace.Name2);             }             swOffset.ReleaseSelectionAccess();         }         public SldWorks swApp;     } } 2第二个为GetType这个API的含义为获取实体的类型下面是API的具体解释 方法没有输入值返回值为这个实体的类型swSelectType_e。 下面是官方的例子 This example shows how to get a component from an assembly feature. //----------------------------------------------------------------------------- // Preconditions: // 1. Open an assembly document with at least one component. // 2. Select a feature in a component in the FeatureManager design tree. // // Postconditions: Inspect the Immediate window. //---------------------------------------------------------------------------- using Microsoft.VisualBasic; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Diagnostics; using SolidWorks.Interop.sldworks; using SolidWorks.Interop.swconst; using System.Runtime.InteropServices; namespace GetComponentFromFeature_CSharp.csproj {     partial class SolidWorksMacro     {         public void Main()         {             ModelDoc2 swModel default(ModelDoc2);             Feature swFeature default(Feature);             Entity swEntity default(Entity);             bool bValue false;             Component2 swComponent default(Component2);             // Get active document             swModel (ModelDoc2)swApp.ActiveDoc;             // Check the document is an assembly             if ((swModel.GetType() ! (int)swDocumentTypes_e.swDocASSEMBLY))             {                 return;             }             // Get the feature             swFeature (Feature)((SelectionMgr)(swModel.SelectionManager)).GetSelectedObject6(1, -1);             // Cast the feature to an entity             swEntity (Entity)swFeature;             // Get type through entity interface             Debug.Print(Entity type as defined in swSelectType_e: swEntity.GetType());             Debug.Assert(swEntity.GetType() (int)swSelectType_e.swSelBODYFEATURES);             // Get type through feature interface             // Feature inherits from Entity, so will actually call Entity::GetType             Debug.Print(Entity type: swFeature.GetType());             // Get the component for the entity             swComponent (Component2)swEntity.GetComponent();             // Print component details             Debug.Print(swComponent.Name2);             Debug.Print(   swComponent.GetPathName());             // Clear the selection lists             swModel.ClearSelection2(true);             // Select the feature through the Entity interface             bValue swEntity.Select4(false, null);             // Print the type of the selected object             Debug.Print(Selected object type as defined in swSelectType_e: ((SelectionMgr)(swModel.SelectionManager)).GetSelectedObjectType3(1, -1));             Debug.Assert(((SelectionMgr)(swModel.SelectionManager)).GetSelectedObjectType3(1, -1) (int)swSelectType_e.swSelBODYFEATURES);             // Clear the selection lists             swModel.ClearSelection2(true);             // Select the feature through the Feature interface             bValue swFeature.Select2(false, 0);             // Print the type of the selected object             Debug.Print(Selected object type as defined in swSelectType_e: ((SelectionMgr)(swModel.SelectionManager)).GetSelectedObjectType3(1, -1));             Debug.Assert(((SelectionMgr)(swModel.SelectionManager)).GetSelectedObjectType3(1, -1) (int)swSelectType_e.swSelBODYFEATURES);         }         public SldWorks swApp;     } } 3第三个为FindAttribute这个API的含义为查找实体上的属性下面是API的具体解释 参数的输入值有两个第一个为要查找的属性第二个为此实体上的类型实例。 今天要介绍的就是上面这三种API本篇文章到此结束我们下篇文章再见。
http://www.zqtcl.cn/news/147337/

相关文章:

  • 免费网站怎么建谁能给个网站谢谢
  • 吴忠网站建设家里面的服务器可以做网站吗
  • 这是我自己做的网站做网站前台要学什么课程
  • 程序网站开发建设隔离变压器移动网站
  • 网站设置不发送消息怎么设置回来用typecho做的网站
  • 网站机房建设嵌入式培训机构哪家好
  • 购物网站页面设计图片网站 签约
  • 上海网站改版方案网站邮件设置
  • 如何在自己网站添加链接高端品牌logo图片
  • 网站建设找c宋南南app软件设计
  • 龙岗网站推广seo 0xu
  • 成都做网站微网站后台录入
  • 开发区网站建设山东房地产新闻
  • 手机如何搭建网站网站菜单导航
  • 网站建设丿金手指专业社交投票论坛网站开发
  • 做一套网站开发多少钱设计高端的国外网站
  • 有没有网站做lol网站的网页设计实验报告书
  • 网站后台域名重庆好的seo平台
  • 文化建设设计公司网站跨境电商亚马逊
  • 建设企业网站官网下载中心游戏网站开发设计报告
  • 外贸网站导航栏建设技巧专做奢侈品品牌的网站
  • 网站开发工程师资格证网站建设代理都有哪些
  • 汕头网站建设技术托管wordpress faq
  • 外贸网站建设系统能联系做仿瓷的网站
  • 阿里云网站域名绑定做网站的需要哪些职位
  • cnnic网站备案dnf网站上怎么做商人
  • 怎么做微拍网站代理记账公司注册
  • 长宁深圳网站建设公司建材公司网站建设方案
  • 做网站哪些软件比较好wordpress的留言功能
  • 域名申请好了怎么做网站山西手机版建站系统信息