本文是帮助里面的一个例子,

首先打开一个三维模型和对应的工程图,保持三维模型为当前激活窗口,在三维模型里面选中一个面或者一个边,然后运行下面的代码,

会将工程图里面的第一视图里面对应的投影元素的线型的宽度改成4

main( )

{

SldWorks App = new SldWorks();
App.Visible = true; ModelDoc2 swModel = App.ActiveDoc;
SelectionMgr swSelMgr = swModel.SelectionManager;
object swEnt = swSelMgr.GetSelectedObject5() as Face2; int lErrorActivatingDoc = ;
string path = @"C:\Users\Administrator\Desktop\零件2.SLDDRW";
DrawingDoc swDrawing = App.ActivateDoc2(path, false, ref lErrorActivatingDoc) as DrawingDoc; SolidWorks.Interop.sldworks.View firstView = swDrawing.GetFirstView();
firstView = firstView.GetNextView(); Face2 face = swEnt as Face2;
var edges = face.GetEdges();
foreach (Edge ee in edges)
{
bool bRet = firstView.SelectEntity(ee, false);
swDrawing.SetLineWidth();
} }

solidworks建立三维模型里面的几何对象和工程图里面的元素的联系的更多相关文章

  1. Envelope几何对象 Curve对象几何对象 Multipatch几何对象 Geometry集合接口 IGeometryCollection接口

    Envelope是所有几何对象的外接矩形,用于表示几何对象的最小边框,所有的几何对象都有一个Envelope对象,IEnvelope是Envelope对象的主要接口,通过它可以获取几何对象的XMax, ...

  2. arcgis for silverlight 地图放大到某个点或者几何对象

    http://blog.csdn.net/xuan444150/article/details/7727866   分类: silverlight王国 GIS王国 2012-07-09 08:50 1 ...

  3. arcgis几何对象

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  4. R语言与医学统计图形-【18】ggplot2几何对象汇总

    ggplot2绘图系统--几何对象汇总 前面介绍了常见的几种基本的几何对象,并且介绍了scale.stat等其他要素.后续将介绍position.themes.coord和faceting等函数. 这 ...

  5. R语言与医学统计图形-【17】ggplot2几何对象之热图

    ggplot2绘图系统--heatmap.geom_rect 这里不介绍更常见的pheatmap包. 1.heatmap函数 基础包. data=as.matrix(mtcars) #接受矩阵 hea ...

  6. R语言与医学统计图形-【15】ggplot2几何对象之线图

    ggplot2绘图系统--几何对象之线图 曲线:点连线.路径曲线.时间序列曲线.模型拟合曲线...... 直线:水平直线.垂直直线.斜线. 1.曲线 对象及其参数. #路径图 geom_path(ma ...

  7. R语言与医学统计图形-【13】ggplot2几何对象之盒形图

    ggplot2绘图系统--几何对象之盒形图 参数: geom_boxplot(mapping = , #lower,middle,upper,x,ymax,ymin必须(有默认) #alpha/col ...

  8. R语言与医学统计图形-【11】ggplot2几何对象之散点图

    ggplot2绘图系统--几何对象之散点图 以geom开头的函数超过30个.几何对象和标度函数scale密不可分.只有在aes中传入某个变量,scale才能发挥作用. 所谓标度scale,就是图形遥控 ...

  9. R语言与医学统计图形-【14】ggplot2几何对象之直方密度图

    ggplot2绘图系统--几何对象之直方图.密度图 1.直方图 参数. geom_histogram(mapping = , data = , stat = 'bin', #统计变换,概率密度为den ...

随机推荐

  1. vue 数组push元素 视图没更新

    Vue 包含一组观察数组的变异方法,所以它们也将会触发视图更新.这些方法如下: push() pop() shift() unshift() splice() sort() reverse() 问题描 ...

  2. C++ 多目录多文件编译 技巧

    http://www.cplusplus.com/forum/articles/10627/ 1.hpp文件 hpp文件可以使用template函数和class静态函数(不含静态成员) a)不可包含全 ...

  3. serial front_door signment and gps signment

    import socketimport serialimport osimport sysimport struct#serial ser_intf = serial.Serial(port='/de ...

  4. POJ 3254 Corn Fields (状压入门)

    Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M≤ 12; 1 ≤ N ≤ 12) ...

  5. C#实现焦点变色

    Form1.cs using System;using System.Collections.Generic;using System.ComponentModel;using System.Data ...

  6. 入门项目 A1 start

    ''' 启动文件入口 ''' from core import src import os import sys # 拿到项目的路径 path = os.path.dirname(__file__) ...

  7. the principle of redbalck tree

  8. video自动填充满父级元素

    想要video能自动填充慢父div的大小,只要给video标签加上style="width= 100%; height=100%; object-fit: fill"即可. obj ...

  9. springboot打war包后部署到tomcat后访问返回404错误

    springboot打war包后部署到tomcat后访问返回404错误 1.正常情况下,修改打包方式为war <packaging>war</packaging> 2.启动类继 ...

  10. C++11 类型后置语法

    #include <iostream> #include <typeinfo> #include <type_traits> using namespace std ...