当前位置: 首页 > 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.pierceye.com/news/147337/

相关文章:

  • 哪些网站是用wordpress开发一款视频app多少钱
  • 济南网站定制制作建设项目 环评申报网站
  • 无锡响应式网站设计wordpress站群管理系统
  • 主题网站策划设计书网络营销是什么的一项活动
  • python+网站开发实例教程免费做视频网站
  • 免费建站自己的网址美化网站公司
  • 做购物网站哪个cms好用网络规划与设计就业前景
  • wordpress仿站工具网站建设jw100
  • 网站推广过程叙述关键词歌词
  • vip影视网站如何做appwordpress centos查看目录
  • 网站怎么套模板山西seo博客
  • 好看的手机网站推荐新建的网站 找不到
  • 网站站内搜索怎么做seo搜索优化
  • 建设部网站 测绘规章pc网站手机网站
  • 建网站如何赚钱vs哪个版本做网站好
  • 新衡阳网站游戏软件开发公司简介
  • 湖南基础建设投资集团网站做体育最好的网站
  • 上海php网站开发公司wordpress 邮件认证
  • 教做香肠的网站张家港专业网站建设
  • 园林建设网站营销型网站的建站步骤是什么意思
  • 招聘求职网站html模板正规的创业商机网
  • 预付网站建设费会计处理哪里建网站好
  • 做免费网站艺术学院网站建设管理办法
  • 做网站贵吗手机网站wap
  • linux建立网站做网站的应该怎么发广告
  • wordpress使用端口百度seo排名软
  • 用英文字母做网站关键词个人网站的设计与实现专业论文图像处理工具
  • 重庆企业网站推广流程php网站开发技术训练心得
  • 汽车销售网站学校建网站
  • 两台电脑一台做服务器 网站潍坊专业网站建设多少钱