C# SolidWorks 二次开发 API — 替换零件

有些情况下我们需要去零件进行升级改版,需要先改好零件再利用替换功能进行升级。

今天简单介绍下如何在装配体中进行零件的替换,当然我们默认参考关系都没问题。

 

代码如下:

private void Btn_ReplacePart_Click(object sender, EventArgs e)
        {
            //首先打开 TempAssembly.sldasm
            //运行后,程序会把装配体中的Clamp1零件替换成Clamp2

            ISldWorks swApp = Utility.ConnectToSolidWorks();

            ModelDoc2 swModel = swApp.ActiveDoc;

            ModelDocExtension swModelDocExt = (ModelDocExtension)swModel.Extension;

            SelectionMgr selectionMgr = swModel.SelectionManager;

            AssemblyDoc assemblyDoc = (AssemblyDoc)swModel;

            //替换为同目录下的clamp2
            string ReplacePartPath = Path.GetDirectoryName(swModel.GetPathName()) + @"\clamp2.sldprt";

            bool boolstatus;

            //选择当前的clamp1
            boolstatus = swModelDocExt.SelectByID2("clamp1-1@TempAssembly", "COMPONENT", 0, 0, 0, false, 0, null, 0);

            boolstatus = assemblyDoc.ReplaceComponents2(ReplacePartPath, "", false, 0, true);

            if (boolstatus == true)
            {
                MessageBox.Show("替换完成!");
            }
        }

 

 

C# SolidWorks 二次开发 API — 把零件中的坐标点转换到总装配中

今天我们来看下solidworks中的坐标矩阵转换,这个例子是把子零件中的一个基准轴的两个端点读出来,并转换到总装配的坐标系中,得到在总装配体坐标系的位置,可以进一步判断轴的真实安装方向。

直接上代码:

 private void btn_Transform_PartToAsm_Click(object sender, EventArgs e)
        {
            //连接到Solidworks

            //这个例子是把零件中的一个基准轴 的两个点的坐标转换到装配体中

            //请打开装配体,并在某个零件下选择一下基准轴

            ISldWorks swApp = Utility.ConnectToSolidWorks();

            ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;

            SelectionMgr swSelMgr = swModel.ISelectionManager;

            Feature swFeat = (Feature)swSelMgr.GetSelectedObject6(1, 0);

            String sAxisName = swFeat.Name;

            RefAxis RefAxis = swFeat.GetSpecificFeature2();

            var vParam = RefAxis.GetRefAxisParams();

            Component2 inletPart = swSelMgr.GetSelectedObjectsComponent4(1, 0);

            double[] nPt = new double[3];
            double[] nPt2 = new double[3];

            object vPt;
            object vPt2;

            nPt[0] = vParam[0]; nPt[1] = vParam[1]; nPt[2] = vParam[2];
            nPt2[0] = vParam[3]; nPt2[1] = vParam[4]; nPt2[2] = vParam[5];

            vPt = nPt;
            vPt2 = nPt2;

            MathUtility swMathUtil = (MathUtility)swApp.GetMathUtility();

            MathTransform mathTransform = inletPart.Transform2;

            MathTransform swXform = (MathTransform)mathTransform;

            MathPoint swMathPt = (MathPoint)swMathUtil.CreatePoint((vPt));

            MathPoint swMathPt2 = (MathPoint)swMathUtil.CreatePoint((vPt2));

            //swXform.Inverse(); 反转的话就是把装配体中的点坐标转到零件对应的坐标系统中

            swMathPt = (MathPoint)swMathPt.MultiplyTransform(swXform);

            swMathPt2 = (MathPoint)swMathPt2.MultiplyTransform(swXform);

            var x = swMathPt.ArrayData[0];
            var y = swMathPt.ArrayData[1];
            var z = swMathPt.ArrayData[2];
            var x2 = swMathPt2.ArrayData[0];
            var y2 = swMathPt2.ArrayData[1];
            var z2 = swMathPt2.ArrayData[2];

            var v1 = x2 - x;
            var v2 = y2 - y;
            var v3 = z2 - z;

            if (Math.Round(v3, 4) != 0 && Math.Round(v1, 4) == 0 && Math.Round(v2, 4) == 0)
            {
                MessageBox.Show("此轴在Z方向上");
            }

          
        }

比较全的关于矩阵转换的一篇文章:

https://cadbooster.com/complete-overview-of-matrix-transformations-in-the-solidworks-api/#available-transformations-solidworks

 

 

C# SolidWorks 二次开发 API — 给指定面上色

功能: 用户选择一个或者多个面, 程序把面的颜色改为红色。

选中这个面,点击按钮,则面改为红色。

下面是代码:完整代码请见码云。

 private void btnSetColor_Click(object sender, EventArgs e)
        {
            //首先选择一个面.  点击按钮,将修改为红色.

            ISldWorks swApp = Utility.ConnectToSolidWorks();

            ModelDoc2 swModel = swApp.ActiveDoc;

            SelectionMgr selectionMgr = swModel.SelectionManager;
            try
            {
                for (int i = 1; i <= selectionMgr.GetSelectedObjectCount(); i++)
                {
                    Face2 face2 = (Face2)selectionMgr.GetSelectedObject6(i, -1);
                    var vFaceProp = swModel.MaterialPropertyValues;

                    var vProps = face2.GetMaterialPropertyValues2(1, null);
                    vProps[0] = 1;
                    vProps[1] = 0;
                    vProps[2] = 0;
                    vProps[3] = vFaceProp[3];
                    vProps[4] = vFaceProp[4];
                    vProps[5] = vFaceProp[5];
                    vProps[6] = vFaceProp[6];
                    vProps[7] = vFaceProp[7];
                    vProps[8] = vFaceProp[8];

                    face2.SetMaterialPropertyValues2(vProps, 1, null);
                    vProps = null;

                    vFaceProp = null;
                }

                swModel.ClearSelection2(true);
            }
            catch (Exception)
            {
                MessageBox.Show("请选择面,其它类型无效!");
            }
        }

 

C# SolidWorks 二次开发 API —读取零件相关属性

如何读取零件相关属性

这一篇看下如何读取属性:

直接上代码:

代码如下:

      private void BtnGetPartData_Click(object sender, EventArgs e)
        {
            //请先打开零件: ..\TemplateModel\clamp1.sldprt

            ISldWorks swApp = Utility.ConnectToSolidWorks();

            if (swApp != null)
            {
                ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc; //当前零件

                //获取通用属性值
                string project = swModel.GetCustomInfoValue("", "Project");

                swModel.DeleteCustomInfo2("", "Qty"); //删除指定项
                swModel.AddCustomInfo3("", "Qty", 30, "1"); //增加通用属性值

                var ConfigNames = (string[])swModel.GetConfigurationNames(); //所有配置名称

                Configuration swConfig = null;

                foreach (var configName in ConfigNames)//遍历所有配置
                {
                    swConfig = (Configuration)swModel.GetConfigurationByName(configName);

                    var manger = swModel.Extension.CustomPropertyManager[configName];
                    //删除当前配置中的属性
                    manger.Delete2("Code");
                    //增加一个属性到些配置
                    manger.Add3("Code", (int)swCustomInfoType_e.swCustomInfoText, "A-" + configName, (int)swCustomPropertyAddOption_e.swCustomPropertyReplaceValue);
                    //获取此配置中的Code属性
                    string tempCode = manger.Get("Code");
                    //获取此配置中的Description属性

                    var tempDesc = manger.Get("Description");
                    Debug.Print("  Name of configuration  ---> " + configName + " Desc.=" + tempCode);
                }
            }
            else
            {
                MessageBox.Show("Please open a part first.");
            }
        }
  

增加一个信息,读取summy里面的信息需要用

swModel.SummaryInfo((int)swSummInfoField_e.swSumInfoComment)

C# SolidWorks 二次开发 API—给零件加材质

这两天比较忙,在整理一份api帮助的功能翻译清单.

今天看一下如何获取零件的材质 以及修改材质.

我们先打开一个零件,如下图:

 

 

        private void btn_SetMaterial_Click(object sender, EventArgs e)
        {
            ISldWorks swApp = Utility.ConnectToSolidWorks();

            ModelDoc2 swModel = swApp.ActiveDoc;
            ModelDocExtension swModelDocExt = (ModelDocExtension)swModel.Extension;
            string swMateDB = "";
            string tempMaterial = "";
            //获取现有材质
            tempMaterial = ((PartDoc)swModel).GetMaterialPropertyName2("", out swMateDB);

            MessageBox.Show($"当前零件材质为 {swMateDB} 中的 {tempMaterial} ");

            string configName = null;
            string databaseName = null;
            string newPropName = null;
            configName = "默认";
            databaseName = "SOLIDWORKS Materials";
            newPropName = "Beech";
            ((PartDoc)swModel).SetMaterialPropertyName2(configName, databaseName, newPropName);

            tempMaterial = ((PartDoc)swModel).GetMaterialPropertyName2("", out swMateDB);

            MessageBox.Show($"修改之后  当前零件材质为 {swMateDB} 中的 {tempMaterial} ");
        }

 

效果如下:

C# SolidWorks 二次开发 API —新零件的创建以及打开已有文件

这一篇我们来看一下如何进行新零件的创建以及打开已有文件,我们以零件为例。

继续建一个按钮来测试

逻辑如下:首先得到文件模板,因为我们手动创建新零件时也是要选择对应的模板的。

Solidworks中的设置如下:

代码:

 private void btnOpenAndNew_Click(object sender, EventArgs e)
        {
            ISldWorks swApp = Utility.ConnectToSolidWorks();

            if (swApp != null)
            {
                //通过GetDocumentTemplate 获取默认模板的路径 ,第一个参数可以指定类型
                string partDefaultTemplate = swApp.GetDocumentTemplate((int)swDocumentTypes_e.swDocPART, "", 0, 0, 0);
                //也可以直接指定slddot asmdot drwdot
                //partDefaultTemplate = @"xxx\..prtdot";

                var newDoc = swApp.NewDocument(partDefaultTemplate, 0, 0, 0);

                if (newDoc != null)
                {
                    //创建完成
                    swApp.SendMsgToUser("Create done.");

                    //下面获取当前文件
                    ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;

                    //选择对应的草图基准面
                    bool boolstatus = swModel.Extension.SelectByID2("Plane1", "PLANE", 0, 0, 0, false, 0, null, 0);

                    //创建一个2d草图
                    swModel.SketchManager.InsertSketch(true);

                    //画一条线 长度100mm  (solidworks 中系统单位是米,所以这里写0.1)
                    swModel.SketchManager.CreateLine(0, 0, 0, 0, 0.1, 0);

                    //关闭草图
                    swModel.SketchManager.InsertSketch(true);

                    string myNewPartPath = @"C:\study\myNewPart.SLDPRT";

                    //保存零件.
                    int longstatus = swModel.SaveAs3(myNewPartPath, 0, 1);

                    //关闭零件
                    swApp.CloseDoc(myNewPartPath);
                    swApp.SendMsgToUser("Closed");
                    //重新打开零件.
                    swApp.OpenDoc(myNewPartPath, (int)swDocumentTypes_e.swDocPART);

                    swApp.SendMsgToUser("Open completed.");
                }
            }
        }

这里我们以创建一个新零件为例(第一次是Part1  第二次就是Part2….):

 

接着会继续创建一个新草图,绘制一条一线。然后把文件保存到指定路径。最后闭文件后再打开。

源代码见码云仓库:https://gitee.com/painezeng/CSharpAndSolidWorks

 

C# SolidWorks 二次开发 API — 2018版 中文翻译-完整版共享

solidworks api帮助文件 翻译目录,示例如下: Access Edges on Rip Feature Example (C#) 此示例显示如何访问接缝特征上的边。 Access Selections Example (VBA) – Code 此示例将基挤出的长度加倍。暗交换为sldworks.sldworks Activate PropertyManager Page Tab Example (C#) 下面的代码示例演示SolidWorks加载项如何使用IPropertyManagerPageTab.Activate以编程方式选择SolidWorks属性管理器页上的选项卡。

立即下载

这是2018的api帮助文档看了一下翻译版,我把之前翻译的文件免费共享下,希望能对大家有所帮助。

如果大家想查找快速了解某个功能,可以直接在Excel表中查找全部。

之前有两篇共享了官方示例与Modeldoc2的一些内容,大家可以去看。

标题 中文描述
IAdvancedHoleFeatureData Interface Methods 有关此类型的所有成员的列表,请参阅iadvancedholefeaturedata members。
AccessSelections Method (IAdvancedHoleFeatureData) 获取对用于定义高级孔特征的选择的访问权限。
GetFarSideElements Method (IAdvancedHoleFeatureData) 获取此高级孔中的远端孔元素。
GetNearSideElements Method (IAdvancedHoleFeatureData) 获取此高级孔中的近边孔元素。
ReleaseSelectionAccess Method (IAdvancedHoleFeatureData) 释放对用于定义孔向导特征的选择的访问权限。
SetFarSideElements Method (IAdvancedHoleFeatureData) 设置此高级孔中的远侧孔元素。
SetNearSideElements Method (IAdvancedHoleFeatureData) 设置此高级孔中的近边孔元素。
IAdvancedSelectionCriteria Interface Methods 有关此类型的所有成员的列表,请参阅IAdvancedSelectionCriteria成员。
AddItem Method (IAdvancedSelectionCriteria) 将条件添加到高级组件选择列表中。
DeleteItem Method (IAdvancedSelectionCriteria) 从高级组件选择列表中删除条件。
GetItem Method (IAdvancedSelectionCriteria) 获取高级组件选择列表中的指定条件。
GetItemCount Method (IAdvancedSelectionCriteria) 获取高级组件选择列表中的条件数。
LoadCriteria Method (IAdvancedSelectionCriteria) 加载指定的查询文件(.sqy)并使其成为当前的高级组件选择列表。
SaveCriteria Method (IAdvancedSelectionCriteria) 将当前高级组件选择列表保存到指定文件。
Select Method (IAdvancedSelectionCriteria) 在“高级组件选择”列表中选择组件。
IAnimation Interface Methods 有关此类型的所有成员的列表,请参见iAnimation Members。
IAnnotationView Interface Methods 有关此类型的所有成员的列表,请参见IAnnotationView成员。
Activate Method (IAnnotationView) 激活此批注视图。
ActivateAndReorient Method (IAnnotationView) 激活并重新定向此批注视图。
GetAnnotations2 Method (IAnnotationView) 获取此批注视图中的批注。
GetViewRotation Method (IAnnotationView) 获取批注视图相对于模型的X-Y平面的旋转矩阵。
Hide Method (IAnnotationView) 隐藏未激活的批注视图中的批注。
IGetViewRotation Method (IAnnotationView) 获取批注视图相对于模型的X-Y平面的旋转矩阵。
IsShown Method (IAnnotationView) 获取是否显示此批注视图中的批注。
MoveAnnotations Method (IAnnotationView) 将指定的批注移动到此批注视图。
Orient Method (IAnnotationView) 确定此批注视图的方向。
Show Method (IAnnotationView) 显示未激活的批注视图中的批注。
IAnnotation Interface Methods 有关此类型的所有成员的列表,请参见iAnnotation Members。
AddOrUpdateStyle Method (IAnnotation) 添加或更新链接到指定样式的注释。
ApplyDefaultStyleAttributes Method (IAnnotation) 将默认样式属性应用于此批注。
CanShowInAnnotationView Method (IAnnotation) 获取此批注是否可以显示在指定的批注视图中。
CanShowInMultipleAnnotationViews Method (IAnnotation) 获取此批注是否可以在多个批注视图中显示。
CheckSpelling Method (IAnnotation) 拼写检查此批注中的文本。
ConvertToMultiJog Method (IAnnotation) 将具有引线的注释转换为具有多折弯引线的注释。
DeleteStyle Method (IAnnotation) 删除指定的样式。
DeSelect Method (IAnnotation) 取消选择此批注。
GetArrowHeadCount Method (IAnnotation) 获取此符号上的箭头数。
GetArrowHeadSizeAtIndex Method (IAnnotation) 获取此批注上指定引线的箭头大小。
GetArrowHeadStyleAtIndex Method (IAnnotation) 获取此批注上特定引线的箭头样式。
GetAttachedEntities3 Method (IAnnotation) 获取此批注附加到的实体。
GetAttachedEntityCount3 Method (IAnnotation) 获取此批注附加到的实体数。
GetAttachedEntityTypes Method (IAnnotation) 获取附加到此批注的实体类型。
GetDashedLeader Method (IAnnotation) 获取此引线是虚线还是实线。
GetDimXpertFeature Method (IAnnotation) 获取与此批注关联的dimxpert功能。
GetDimXpertName Method (IAnnotation) 获取此批注的dimxpert名称。
GetDisplayData Method (IAnnotation) 获取此批注的显示数据。
GetFlipPlaneTransform Method (IAnnotation) 获取批注平面在相反方向上的转换矩阵。
GetLeaderAllAround Method (IAnnotation) 获取此批注的全方位符号显示的设置。
GetLeaderCount Method (IAnnotation) 获取此批注上的引线数。
GetLeaderPerpendicular Method (IAnnotation) 获取此批注的垂直弯曲引线显示设置。
GetLeaderPointsAtIndex Method (IAnnotation) 获取有关此批注上指定引线的坐标信息。
GetLeaderSide Method (IAnnotation) 获取此批注的引线附件侧设置。
GetLeaderStyle Method (IAnnotation) 获取此领导的样式。
GetMultiJogLeaderCount Method (IAnnotation) 获取此批注上多个折弯指引线的数目。
GetMultiJogLeaders Method (IAnnotation) 获取此批注上的多重折弯指引线。
GetName Method (IAnnotation) 获取此批注的名称。
GetNext3 Method (IAnnotation) 获取下一个批注。
GetParagraphs Method (IAnnotation) 获取此注释批注中的段落。
GetPlane Method (IAnnotation) 获取批注相对于模型的X-Y平面的旋转矩阵。
GetPosition Method (IAnnotation) 获取此批注的位置。
GetSmartArrowHeadStyle Method (IAnnotation) 获取此批注的智能箭头样式的设置。
GetSpecificAnnotation Method (IAnnotation) 获取与此批注关联的特定基础对象。
GetStyleName Method (IAnnotation) 获取应用于此批注的样式的名称。
GetTextFormat Method (IAnnotation) 获取此批注中指定文本的文本格式。
GetTextFormatCount Method (IAnnotation) 获取此批注的文本格式数。
GetType Method (IAnnotation) 获取批注的类型。
GetUseDocTextFormat Method (IAnnotation) 获取SolidWorks当前是否正在为此批注使用文档默认文本格式设置。
GetVisualProperties Method (IAnnotation) 获取此批注的视觉属性。
IGetAttachedEntityTypes Method (IAnnotation) 获取附加到此批注的所有实体的类型。
IGetDisplayData Method (IAnnotation) 获取批注的显示数据。
IGetLeaderPointsAtIndex Method (IAnnotation) 获取有关此批注上指定引线的坐标信息。
IGetMultiJogLeaders Method (IAnnotation) 获取此批注上的多重折弯指引线。
IGetPosition Method (IAnnotation) 获取此批注的位置。
IGetSpecificAnnotation Method (IAnnotation) 获取与此批注关联的特定基础对象。
IGetTextFormat Method (IAnnotation) 获取此批注中指定文本的文本格式。
IGetVisualProperties Method (IAnnotation) 获取此批注的视觉属性。
IsDangling Method (IAnnotation) 获取此批注是否悬空。
IsDimXpert Method (IAnnotation) 获取批注是否为dimxpert批注。
ISetAttachedEntities Method (IAnnotation) 将此批注附加到指定的实体。
ISetTextFormat Method (IAnnotation) 设置此批注中指定文本的文本格式信息。
LoadStyle Method (IAnnotation) 加载指定的样式。
SaveStyle Method (IAnnotation) 保存指定的样式。
Select3 Method (IAnnotation) 选择此批注并将其标记。
SetArrowHeadSizeAtIndex Method (IAnnotation) 设置此批注上指定引线的箭头大小。
SetArrowHeadStyleAtIndex Method (IAnnotation) 设置此批注上特定引线的箭头样式。
SetAttachedEntities Method (IAnnotation) 将此批注附加到指定的实体。
SetLeader3 Method (IAnnotation) 设置此批注的引线特征。
SetLeaderAttachmentPointAtIndex Method (IAnnotation) 为具有指定索引的批注设置引线的指定附着点。
SetName Method (IAnnotation) 设置此批注的名称。
SetPosition2 Method (IAnnotation) 设置此批注的位置。
SetStyleName Method (IAnnotation) 设置此批注的样式。
SetTextFormat Method (IAnnotation) 设置此批注中指定文本的文本格式。
IAssemblyDoc Interface Methods 有关此类型的所有成员的列表,请参见iAssemblyDoc成员。
ActivateGroundPlane Method (IAssemblyDoc) 激活指定配置的地平面。
AddComponent5 Method (IAssemblyDoc) 将指定配置选项的指定组件添加到此程序集。
AddComponentConfiguration Method (IAssemblyDoc) 为最后选定的部件添加新配置。
AddComponents3 Method (IAssemblyDoc) 将多个零部件添加到部件中。
AddConcentricMateWithTolerance Method (IAssemblyDoc) 将未对齐的同心配合添加到此部件。
AddDistanceMate Method (IAssemblyDoc) 将距离配合添加到此部件。
AddMate5 Method (IAssemblyDoc) 将配合添加到此部件。
AddPipePenetration Method (IAssemblyDoc) 使用在选定草图点处结束的管道穿透相邻管件或管道。
AddPipingFitting Method (IAssemblyDoc) 将管件添加到当前管道部件。
AddSmartComponent Method (IAssemblyDoc) 将指定坐标处的指定组件作为智能组件添加到此程序集。
AddToFeatureScope Method (IAssemblyDoc) 将零部件添加到当前选定部件特征的范围中。
AutoAngleAxis Method (IAssemblyDoc) 自动检测轴的角度伴侣。
AutoExplode Method (IAssemblyDoc) 自动生成当前部件配置的分解图。
CompConfigProperties5 Method (IAssemblyDoc) 设置指定配置中选定组件的属性。
CopyWithMates2 Method (IAssemblyDoc) 复制此部件中的一个或多个具有配合的零部件。
CreateExplodedView Method (IAssemblyDoc) 创建活动程序集配置的分解视图。
CreateMate Method (IAssemblyDoc) 使用指定的数据创建高级配合。
CreateMateData Method (IAssemblyDoc) 为指定的配合类型创建高级配合特征数据。
CreateSmartComponent Method (IAssemblyDoc) 创建智能组件。
CreateSpeedPak Method (IAssemblyDoc) 为此程序集中选定部件的活动配置创建指定类型的SpeedPak。
DeleteSelections Method (IAssemblyDoc) 删除子部件的选定零部件或选定零部件的子部件。
DissolveComponentPattern Method (IAssemblyDoc) 溶解选定的组件模式。
DissolveSubAssembly Method (IAssemblyDoc) 在此部件中分解选定的部件。
EditAssembly Method (IAssemblyDoc) 切换回程序集文档进行编辑。
EditConcentricMate Method (IAssemblyDoc) 编辑未对齐的同心配合。
EditDistanceMate Method (IAssemblyDoc) 编辑距离配合。
EditMate4 Method (IAssemblyDoc) 编辑选定的装配零部件配合关系。
EditPart2 Method (IAssemblyDoc) 在部件上下文中编辑选定的零件。
ExitIsolate Method (IAssemblyDoc) 退出隔离所选组件并将程序集返回其初始显示状态。
FeatureByName Method (IAssemblyDoc) 返回部件中命名特征的iFeature对象。
FileDeriveComponentPart Method (IAssemblyDoc) 从当前选定的部件创建新的零件文档。
FixComponent Method (IAssemblyDoc) 修复选定的组件;即,使其不可移动。
ForceUpdateElectricalData2 Method (IAssemblyDoc) 强制更新电气数据。
GetActiveGroundPlane Method (IAssemblyDoc) 获取指定配置的活动地平面。
GetAdvancedSelection Method (IAssemblyDoc) 获取高级组件选择。
GetBox Method (IAssemblyDoc) 获取边界框。
GetComponentByID Method (IAssemblyDoc) 使用组件ID获取顶级程序集组件。
GetComponentByName Method (IAssemblyDoc) 获取指定的顶级程序集组件。
GetComponentCount Method (IAssemblyDoc) 获取此程序集的活动配置中的组件数。
GetComponents Method (IAssemblyDoc) 获取此程序集的活动配置中的所有组件。
GetDragOperator Method (IAssemblyDoc) 获取此程序集中动态拖动操作的拖动运算符。
GetDroppedAtEntity Method (IAssemblyDoc) 获取指向将文件放入此程序集中的实体的指针。
GetEditTarget Method (IAssemblyDoc) 获取当前正在编辑的模型文档。
GetEditTargetComponent Method (IAssemblyDoc) 获取当前正在编辑的组件。
GetExplodedViewConfigurationName Method (IAssemblyDoc) 获取指定分解视图的配置名称。
GetExplodedViewCount2 Method (IAssemblyDoc) 获取指定配置中的分解视图数。
GetExplodedViewNames2 Method (IAssemblyDoc) 获取指定配置中分解视图的名称。
GetFeatureScope Method (IAssemblyDoc) 获取受此功能影响的组件。
GetFeatureScopeCount Method (IAssemblyDoc) 获取受此功能影响的组件数。
GetLightWeightComponentCount Method (IAssemblyDoc) 获取程序集中轻型组件的数目。
GetRouteManager Method (IAssemblyDoc) 获取SolidWorks路由API。
GetUnloadedComponentNames Method (IAssemblyDoc) 获取已卸载组件的路径、引用的配置名称、卸载原因、文档类型和名称。
GetVisibleComponentsInView Method (IAssemblyDoc) 获取此程序集中要另存为实体的可见组件的列表。
GetVisibleComponentsInViewCount Method (IAssemblyDoc) 获取此程序集中可见组件的数目。
HasUnloadedComponents Method (IAssemblyDoc) 获取此程序集是否具有隐藏或抑制的已卸载组件。
IAddComponents3 Method (IAssemblyDoc) 将多个零部件添加到部件中。
IFeatureByName Method (IAssemblyDoc) 返回部件中命名特征的iFeature对象。
IGetBox Method (IAssemblyDoc) 获取边界框。
IGetComponents Method (IAssemblyDoc) 获取此程序集的活动配置中的所有组件。
IGetDragOperator Method (IAssemblyDoc) 获取此程序集中动态拖动操作的拖动运算符。
IGetEditTarget2 Method (IAssemblyDoc) 获取当前正在编辑的模型文档。
IGetFeatureScope Method (IAssemblyDoc) 获取受此功能影响的组件。
IGetVisibleComponentsInView Method (IAssemblyDoc) 获取此程序集中要另存为实体的可见组件的列表。
InsertCavity4 Method (IAssemblyDoc) 使用选定的零部件将型腔插入激活零件。
InsertDerivedPattern Method (IAssemblyDoc) 从选定的阵列和种子组件创建派生组件。
InsertEnvelope Method (IAssemblyDoc) 在此程序集中以指定的配置名称添加信封。
InsertJoin2 Method (IAssemblyDoc) 从合并的选定组件构造特征。
InsertLoadReference Method (IAssemblyDoc) 创建对指定或选定配合的配合加载引用。
InsertNewAssembly Method (IAssemblyDoc) 创建新的虚拟子部件,并可选地将其保存到指定的文件中。
InsertNewPart2 Method (IAssemblyDoc) 在指定的面或平面上插入新零件。
InsertNewVirtualAssembly Method (IAssemblyDoc) 从该程序集创建新程序集,并将其内部保存为虚拟组件。

下载路径 https://download.csdn.net/download/zengqh0314/12170828

C# SolidWorks 二次开发 API —修改零件

如何修改当前零件:

这一次示例包含了:增加配置,增加特征, 压缩特征,修改尺寸,删除特征

直接上代码:

 private void Btn_ChangeDim_Click(object sender, EventArgs e)
        {
            //请先打开零件: ..\TemplateModel\clamp1.sldprt
            ISldWorks swApp = Utility.ConnectToSolidWorks();

            if (swApp != null)
            {
                //1.增加配置
                ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;
                string NewConfigName = "NewConfig";
                bool boolstatus = swModel.AddConfiguration2(NewConfigName, "", "", true, false, false, true, 256);

                swModel.ShowConfiguration2(NewConfigName);

                //2.增加特征(选择一条边,加圆角)
                boolstatus = swModel.Extension.SelectByID2("", "EDGE", 3.75842546947069E-03, 3.66350829162911E-02, 1.23295158888936E-03, false, 1, null, 0);

                Feature feature = swModel.FeatureManager.FeatureFillet3(195, 0.000508, 0.01, 0, 0, 0, 0, null, null, null, null, null, null, null);

                //3.压缩特征

                feature.Select(false);

                swModel.EditSuppress();

                //4.修改尺寸
                swModel.Parameter("D1@Fillet8").SystemValue = 0.000254; //0.001英寸

                swModel.EditRebuild3();

                //5.删除特征

                feature.Select(false);
                swModel.EditDelete();
            }
        }

完整代码见:https://gitee.com/painezeng/CSharpAndSolidWorks

C# SolidWorks 二次开发 API — 创建Pane页面(预览BOM)

今天讲一下怎么在Solidworks界面中显示出窗体界面。

今天的功能是在右边提前预览BOM 清单,功能比较简单。预览图如下:

由于不是插件的形势,所以效率不是太高,如果大家想速度快,请自己改成插件形式,其实更好的方法是做成插件,可以在打开装配体之后自动预览BOM, 时间关系,这里仅作为示例。

这里面涉及到的功能大概有,遍历装配体,遍历零件属性,组织层级结构等等。

完成后效果如下图:

下面只显示了关键的页面加载代码,实际的代码请参考源码: 

https://gitee.com/painezeng/CSharpAndSolidWorks

 private void btn_Pane_Click(object sender, EventArgs e)
        {
            //注意: 这里只是显示自己的窗体到solidworks中,目前还是走的exe的方式 .
            //真正开发的时候应该在DLL中加入,这样速度会快很多.  exe读bom需要40s dll 只需要3秒左右.
            //获取当前程序所在路径
            string Dllpath = Path.GetDirectoryName(typeof(MyPane).Assembly.CodeBase).Replace(@"file:\", string.Empty);

            var imagePath = Path.Combine(Dllpath, "bomlist.bmp");

            ISldWorks swApp = Utility.ConnectToSolidWorks();

            string toolTip;

            toolTip = "BOM List";

            //创建页面
            if (taskpaneView != null)
            {
                taskpaneView.DeleteView();
                Marshal.FinalReleaseComObject(taskpaneView);
                taskpaneView = null;
            }

            taskpaneView = swApp.CreateTaskpaneView2(imagePath, toolTip);

            MyPane myPane = new MyPane(swApp);

            myPane.Dock = DockStyle.Fill;
            // myPane.Show();

            //在页面中显示窗体(嵌入)

            taskpaneView.DisplayWindowFromHandlex64(myPane.Handle.ToInt64());
        }

如果大家有什么问题,可以留言给我。

C# SolidWorks 二次开发 API — 2018版 中文翻译 之事件

最近把api中所有的属性 事件 实例 汇总了一下,发现有好多东西没有接触过。

写了个程序,利用百度翻译api 来自动翻译的,由于某些原因,没法使用自定义词库来实现更精准的翻译。应该还是有很多翻译有些问题的,不过大概意思没什么问题了。

DAssemblyDocEvents_ActiveConfigChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户即将切换到其他配置时,预先通知用户程序。
DAssemblyDocEvents_ActiveConfigChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户切换到其他配置时通知用户程序。
DAssemblyDocEvents_ActiveDisplayStateChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在配置的显示状态更改或配置更改后激发。
DAssemblyDocEvents_ActiveDisplayStateChangePreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在更改配置的显示状态或更改配置之前激发。
DAssemblyDocEvents_ActiveViewChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当活动视图更改时激发。
DAssemblyDocEvents_AddCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户添加自定义属性时通知用户程序。
DAssemblyDocEvents_AddItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 将组件添加到FeatureManager设计树时通知用户。
DAssemblyDocEvents_AddMatePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在将配合添加到程序集后激发。
DAssemblyDocEvents_AssemblyElectricalDataUpdateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) solidworks软件更新电气数据时激发。
DAssemblyDocEvents_AutoSaveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 自动保存程序集文档时激发。
DAssemblyDocEvents_AutoSaveToStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当程序集文档自动保存到第三方IStream存储时激发。
DAssemblyDocEvents_AutoSaveToStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当程序集文档自动保存到第三方iStorage存储时激发。
DAssemblyDocEvents_BeginInContextEditNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序用户正开始在程序集上下文(在程序集文档窗口中)中编辑程序集组件。
DAssemblyDocEvents_BodyVisibleChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序用户正开始在程序集上下文(在程序集文档窗口中)中编辑程序集组件。
DAssemblyDocEvents_ChangeCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户更改自定义属性时通知用户程序。
DAssemblyDocEvents_ClearSelectionsNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 使用“清除选择”清除选择时通知用户程序。
DAssemblyDocEvents_CloseDesignTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 预先通知应用程序正在编辑的设计表即将关闭。
DAssemblyDocEvents_CommandManagerTabActivatedPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 预先通知您solidworks commandmanager选项卡即将激活。
DAssemblyDocEvents_ComponentConfigurationChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集中更改引用组件的配置时激发。
DAssemblyDocEvents_ComponentDisplayModeChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集中更改引用组件的显示模式后激发。
DAssemblyDocEvents_ComponentDisplayModeChangePreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集中更改引用组件的显示模式之前激发。
DAssemblyDocEvents_ComponentDisplayStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当组件的显示状态(如着色、线框等)更改时激发。
DAssemblyDocEvents_ComponentMoveNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 当用户释放鼠标按钮时发送的后通知,指示组件已移动到所需的目标。
DAssemblyDocEvents_ComponentReferredDisplayStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当组件的引用显示状态更改时激发。
DAssemblyDocEvents_ComponentReorganizeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集或子程序集中重新组织一个或多个组件时激发。
DAssemblyDocEvents_ComponentStateChangeNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 每当此程序集中的组件状态更改时激发。
DAssemblyDocEvents_ComponentVisibleChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当组件更改为隐藏或显示时激发。
DAssemblyDocEvents_ComponentVisualPropertiesChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当组件的视觉属性(如颜色、透明度等)更改时激发。
DAssemblyDocEvents_ConfigurationChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 获取有关已更改其可配置参数之一的对象或功能的信息。
DAssemblyDocEvents_DeleteCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户删除自定义属性时通知用户程序。
DAssemblyDocEvents_DeleteItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从solidworks树结构(例如,featuremanager设计树或configurationmanager树)中删除项目时通知用户程序。
DAssemblyDocEvents_DeleteItemPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当一个项目即将从solidworks树结构(例如,featuremanager设计树或configurationmanager树)中删除时通知用户程序。
DAssemblyDocEvents_DeleteSelectionPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 删除选定内容时预先通知用户程序。
DAssemblyDocEvents_DestroyNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 当程序集文档即将被销毁时,预先通知用户程序。
DAssemblyDocEvents_DimensionChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通过维度对话框更改维度时激发。
DAssemblyDocEvents_DragStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 启动或停止拖动Instant3D操纵器时激发。
DAssemblyDocEvents_DynamicHighlightNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当所选对象的动态高亮显示从“开”变为“关”时,POST会通知应用程序,反之亦然。
DAssemblyDocEvents_EndInContextEditNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序用户已在程序集上下文(在程序集文档窗口中)中完成对程序集组件的编辑。
DAssemblyDocEvents_EquationEditorPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序公式编辑器正在被销毁。
DAssemblyDocEvents_EquationEditorPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序已构造公式编辑器。
DAssemblyDocEvents_FeatureEditPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户编辑选定要素的定义时,预先通知用户程序。
DAssemblyDocEvents_FeatureManagerFilterStringChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在FeatureManager设计树筛选器中键入文本或调用IModelDocExtension::FeatureManagerFilterString时激发。
DAssemblyDocEvents_FeatureManagerTabActivatedNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当管理器窗格中的活动选项卡更改时激发。
DAssemblyDocEvents_FeatureManagerTabActivatedPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在管理器窗格中的活动选项卡更改之前激发。
DAssemblyDocEvents_FeatureManagerTreeRebuildNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重建活动文档的featuremanager设计树时通知用户程序。
DAssemblyDocEvents_FeatureSketchEditPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户编辑草图定义时,预先通知用户程序。
DAssemblyDocEvents_FileDropNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当部件从Windows资源管理器拖放到程序集时激发。
DAssemblyDocEvents_FileDropPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当部件从Windows资源管理器拖放到程序集时,POST会通知用户应用程序。
DAssemblyDocEvents_FileDropPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在将部件从Windows资源管理器拖放到程序集文档中之前,预先通知用户应用程序。
DAssemblyDocEvents_FileReloadCancelNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 如果取消iAssembly事件fileReloadNotify,则激发。
DAssemblyDocEvents_FileReloadNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重新加载程序集文档时通知用户程序。
DAssemblyDocEvents_FileReloadPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 重新加载程序集文档时预先通知用户程序。
DAssemblyDocEvents_FileSaveAsNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 当文件即将以新名称保存并传递新文档名称时,预先通知用户程序。此事件在solidworks显示“文件保存”对话框之前发送。
DAssemblyDocEvents_FileSaveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当文件即将保存并传递当前文档名时,预先通知用户程序。
DAssemblyDocEvents_FileSavePostCancelNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 如果未激发fileSavePostNotify,则激发。
DAssemblyDocEvents_FileSavePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在solidworks中保存文件时通知用户程序。
DAssemblyDocEvents_FlipLoopNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 循环翻转时通知程序。
DAssemblyDocEvents_InsertTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 将表插入程序集中时通知程序。
DAssemblyDocEvents_InterferenceNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在“移动/旋转零部件”命令期间,通知程序部件中的零件之间存在干涉。
DAssemblyDocEvents_LightingDialogCreateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户打开照明对话框时激发。
DAssemblyDocEvents_LoadFromStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从第三方IStream存储中安全加载数据时激发。
DAssemblyDocEvents_LoadFromStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从第三方iStorage存储中安全加载数据时激发。
DAssemblyDocEvents_ModifyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 首次将文档标记为脏时激发。
DAssemblyDocEvents_ModifyTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集中修改表时通知程序。
DAssemblyDocEvents_NewSelectionNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在选择列表更改时通知用户程序。
DAssemblyDocEvents_OpenDesignTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) POST通知应用程序设计表已打开进行编辑。
DAssemblyDocEvents_PreRenameItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当程序集中的组件文档即将重命名时激发。
DAssemblyDocEvents_PromptBodiesToKeepNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当一个实体被切割成多个实体时生成。
DAssemblyDocEvents_PublishTo3DPDFNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 将程序集文档发布到SolidWorks MBD 3D PDF时激发。
DAssemblyDocEvents_RedoPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集文档中发生重做操作后激发。
DAssemblyDocEvents_RedoPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集文档中发生重做操作之前激发。
DAssemblyDocEvents_RegenNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集文档即将重建时预先通知用户程序。
DAssemblyDocEvents_RegenPostNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在重新生成程序集文档时通知用户程序。
DAssemblyDocEvents_RenamedDocumentNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 保存程序集文档时激发,其中重命名的组件文件被其他程序集文档引用。
DAssemblyDocEvents_RenameItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在solidworks树结构(如featuremanager设计树或configurationmanager树)中重命名项时激发。
DAssemblyDocEvents_SaveToStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在安全地将数据保存到第三方IStream存储时激发。
DAssemblyDocEvents_SaveToStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在安全地将数据保存到第三方iStorage存储时激发。
DAssemblyDocEvents_SelectiveOpenPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当选择部件进行快速查看/选择打开时,POST通知用户程序。
DAssemblyDocEvents_SensorAlertPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在传感器的值偏离程序集文档中的限制之前触发。
DAssemblyDocEvents_SketchSolveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在解决草图时激发;例如,在拖动草图实体、添加或编辑关系、更改尺寸等时激发。
DAssemblyDocEvents_SuppressionStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当功能的抑制状态更改时激发。
DAssemblyDocEvents_UndoPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集文档中发生撤消操作后激发。
DAssemblyDocEvents_UndoPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集文档中发生撤消操作之前激发。
DAssemblyDocEvents_UnitsChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当文档单位更改时激发。
DAssemblyDocEvents_UserSelectionPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在程序集文档中选择实体后激发。
DAssemblyDocEvents_UserSelectionPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当交互用户将光标移到程序集文档中的模型视图上或单击该视图时激发。
DAssemblyDocEvents_ViewNewNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在创建新的视图模型窗口时通知用户程序。
DDrawingDocEvents_ActivateSheetPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 激活图纸后通知用户程序。
DDrawingDocEvents_ActivateSheetPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在激活图纸之前通知用户程序。
DDrawingDocEvents_ActiveConfigChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户即将切换到其他配置时,预先通知用户程序。
DDrawingDocEvents_ActiveConfigChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户切换到其他配置时通知用户程序。
DDrawingDocEvents_AddCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户添加自定义属性时通知用户程序。
DDrawingDocEvents_AddItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 将项添加到solidworks树结构(例如,featuremanager设计树、configurationmanager树等)时通知用户程序。
DDrawingDocEvents_AutoSaveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 自动保存绘图文档时激发。
DDrawingDocEvents_AutoSaveToStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当绘图文档自动保存到第三方IStream存储时激发。
DDrawingDocEvents_AutoSaveToStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当绘图文档自动保存到第三方iStorage存储时激发。
DDrawingDocEvents_ChangeCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户更改自定义属性时通知用户程序。
DDrawingDocEvents_ClearSelectionsNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 使用“清除选择”清除选择时通知用户程序。
DDrawingDocEvents_CommandManagerTabActivatedPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 预先通知您solidworks commandmanager选项卡即将激活。
DDrawingDocEvents_DeleteCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户删除自定义属性时通知用户程序。
DDrawingDocEvents_DeleteItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从solidworks树结构(例如,featuremanager设计树或configurationmanager树)中删除项目时通知用户程序。
DDrawingDocEvents_DeleteItemPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当一个项即将从solidworks树结构(例如,featuremanager设计树或configurationmanager树)中删除时通知用户程序。
DDrawingDocEvents_DeleteSelectionPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 删除选定内容时预先通知用户程序。
DDrawingDocEvents_DestroyNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 当图形文档即将被销毁时,预先通知用户程序。
DDrawingDocEvents_DimensionChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通过维度对话框更改维度时激发。
DDrawingDocEvents_DynamicHighlightNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当所选对象的动态高亮显示从“开”变为“关”时,POST会通知应用程序,反之亦然。
DDrawingDocEvents_EquationEditorPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序公式编辑器正在被销毁。
DDrawingDocEvents_EquationEditorPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序已构造公式编辑器。
DDrawingDocEvents_FeatureManagerTabActivatedNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当管理器窗格中的活动选项卡更改时激发。
DDrawingDocEvents_FeatureManagerTabActivatedPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在管理器窗格中的活动选项卡更改之前激发。
DDrawingDocEvents_FeatureManagerTreeRebuildNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重建活动文档的featuremanager设计树时通知用户程序。
DDrawingDocEvents_FileReloadPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 重新加载图形文档时预先通知用户应用程序。
DDrawingDocEvents_FileSaveAsNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 在显示文件保存对话框之前发送预先通知。
DDrawingDocEvents_FileSaveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当文件即将保存并传递当前文档名时,预先通知用户程序。
DDrawingDocEvents_FileSavePostCancelNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 如果未激发fileSavePostNotify,则激发。
DDrawingDocEvents_FileSavePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在solidworks中保存图形时通知用户程序。
DDrawingDocEvents_InsertTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在图形中插入表时通知程序。
DDrawingDocEvents_LoadFromStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从第三方IStream存储中安全加载数据时激发。
DDrawingDocEvents_LoadFromStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从第三方iStorage存储中安全加载数据时激发。
DDrawingDocEvents_ModifyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 首次将文档标记为脏时激发。
DDrawingDocEvents_ModifyTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在图形中修改表时通知程序。
DDrawingDocEvents_NewSelectionNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在选择列表更改时通知用户程序。
DDrawingDocEvents_RedoPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在绘图文档中发生重做操作后激发。
DDrawingDocEvents_RedoPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在绘图文档中发生重做操作之前激发。
DDrawingDocEvents_RegenNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当要重新生成图形文档时,预先通知用户程序。
DDrawingDocEvents_RegenPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重新生成图形文档时通知用户程序。
DDrawingDocEvents_RenameItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在solidworks树结构(例如,featuremanager设计树或configurationmanager树)中重命名项时通知用户程序。
DDrawingDocEvents_SaveToStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在安全地将数据保存到第三方IStream存储时激发。
DDrawingDocEvents_SaveToStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在安全地将数据保存到第三方iStorage存储时激发。
DDrawingDocEvents_SketchSolveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在解决草图时激发;例如,在拖动草图实体、添加或编辑关系、更改尺寸等时激发。此事件返回要更新的草图特征的名称。
DDrawingDocEvents_UndoPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在绘图文档中发生撤消操作后激发。
DDrawingDocEvents_UndoPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在绘图文档中发生撤消操作之前激发。
DDrawingDocEvents_UnitsChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 文档单位更改时引发。
DDrawingDocEvents_UserSelectionPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在图形文档中选择实体后激发。
DDrawingDocEvents_UserSelectionPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当交互用户将光标移到绘图文档中的绘图视图上或单击该视图时激发。
DDrawingDocEvents_ViewCreatePreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当要创建工程视图时,预先通知用户应用程序。
DDrawingDocEvents_ViewNewNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在创建新的视图窗口时通知用户程序。
DFeatMgrViewEvents_ActivateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 一旦激活FeatureManager设计树视图并返回视图句柄,POST就会通知用户程序。
DFeatMgrViewEvents_DeactivateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 一旦禁用FeatureManager设计树状图并返回视图句柄,POST就会通知用户程序。
DFeatMgrViewEvents_DestroyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当FeatureManager设计树状图即将被销毁时,预先通知用户程序并返回视图句柄。
DModelViewEvents_BufferSwapNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在opengl中渲染着色图形时,在交换缓冲区之前立即从模型视图激发。
DModelViewEvents_DestroyNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 当模型视图即将被破坏时,预先通知用户程序。
DModelViewEvents_DisplayModeChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) POST在更改模型视图显示模式时通知用户程序。
DModelViewEvents_DisplayModeChangePreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当模型视图显示模式即将更改时,预先通知用户程序。
DModelViewEvents_GraphicsRenderPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在绘制所有solidworks图形(包括solidworks模型、草图、尺寸和注释图形)后激发。
DModelViewEvents_PerspectiveViewNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在透视图更改时通知用户程序(例如,如果用户旋转透视图)。
DModelViewEvents_PrintNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 打印文档时通知用户程序。
DModelViewEvents_RenderLayer0NotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 每当solidworks渲染到layer0时激发。
DModelViewEvents_RepaintNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当视图要重新绘制时,预先通知用户程序并返回绘制类型。
DModelViewEvents_RepaintPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重新绘制视图时通知用户程序。
DModelViewEvents_UserClearSelectionsNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 用户时激发:当指针位于PropertyManager页上的选择框上时,单击鼠标右键。选择快捷菜单上的“清除选择”。
DModelViewEvents_ViewChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在视图更改时通知用户程序,并返回视图的新转换矩阵。
DMouseEvents_MouseLBtnDblClkNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 双击鼠标左键时激发。
DMouseEvents_MouseLBtnDownNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 按下鼠标左键时激发。
DMouseEvents_MouseLBtnUpNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 按下鼠标左键后释放时激发。
DMouseEvents_MouseMBtnDblClkNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 双击鼠标中键时激发。
DMouseEvents_MouseMBtnDownNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 按下鼠标中键时激发。
DMouseEvents_MouseMBtnUpNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 按下鼠标中键后释放时激发。
DMouseEvents_MouseMoveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 移动鼠标指针时激发。
DMouseEvents_MouseNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 每当鼠标事件发生时激发。
DMouseEvents_MouseRBtnDblClkNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 双击鼠标右键时激发。
DMouseEvents_MouseRBtnDownNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 按下鼠标右键时激发。
DMouseEvents_MouseRBtnUpNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 按下鼠标右键后释放时激发。
DMouseEvents_MouseSelectNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户使用鼠标在模型视图中进行选择时激发。
DPartDocEvents_ActiveConfigChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户即将切换到其他配置时,预先通知用户程序。
DPartDocEvents_ActiveConfigChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户切换到其他配置时通知用户程序。
DPartDocEvents_ActiveDisplayStateChangePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在配置的显示状态更改或配置更改后激发。
DPartDocEvents_ActiveDisplayStateChangePreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在更改配置的显示状态或更改配置之前激发。
DPartDocEvents_ActiveViewChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当活动视图更改时激发。
DPartDocEvents_AddCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户添加自定义属性时通知用户程序。
DPartDocEvents_AddItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 将项添加到某个SolidWorks树结构(如FeatureManager设计树和配置管理器)时激发。
DPartDocEvents_AutoSaveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 自动保存零件文档时激发。
DPartDocEvents_AutoSaveToStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当部件文档自动保存到第三方IStream存储时激发。
DPartDocEvents_AutoSaveToStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当部件文档自动保存到第三方iStorage存储时激发。
DPartDocEvents_BodyVisibleChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 每当此部分中的实体的可见状态更改时激发。
DPartDocEvents_ChangeCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户更改自定义属性时通知用户程序。
DPartDocEvents_ClearSelectionsNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 使用“清除选择”清除选择时通知用户程序。
DPartDocEvents_CloseDesignTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 预先通知应用程序已打开进行编辑的设计表即将关闭。
DPartDocEvents_CommandManagerTabActivatedPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 预先通知您solidworks commandmanager选项卡即将激活。
DPartDocEvents_ConfigurationChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 获取有关某个对象或功能的信息,如果该对象或功能的可配置参数发生更改,则该对象或功能具有该对象或功能。
DPartDocEvents_ConvertToBodiesPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在“转换为实体”对话框关闭后激发。
DPartDocEvents_ConvertToBodiesPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在“转换为实体”对话框打开之前激发。
DPartDocEvents_DeleteCustomPropertyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在用户删除自定义属性时通知用户程序。
DPartDocEvents_DeleteItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从solidworks树结构(如featuremanager设计树和configurationmanager)中删除项目时通知用户程序。
DPartDocEvents_DeleteItemPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当一个项目即将从solidworks树结构(如featuremanager设计树和configurationmanager)中删除时通知用户程序。
DPartDocEvents_DeleteSelectionPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 删除选定内容时预先通知用户。
DPartDocEvents_DestroyNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 当部件文档即将被销毁时,预先通知用户程序。
DPartDocEvents_DimensionChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通过维度对话框更改维度时激发。
DPartDocEvents_DragStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 启动或停止拖动Instant3D操纵器时激发。
DPartDocEvents_DynamicHighlightNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当所选对象的动态高亮显示从“开”变为“关”时,POST会通知应用程序,反之亦然。
DPartDocEvents_EquationEditorPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序公式编辑器正在被销毁。
DPartDocEvents_EquationEditorPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 通知应用程序已构造公式编辑器。
DPartDocEvents_FeatureEditPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户编辑选定要素的定义时,预先通知用户程序。
DPartDocEvents_FeatureManagerFilterStringChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在FeatureManager设计树筛选器中键入文本或调用IModelDocExtension::FeatureManagerFilterString时激发。
DPartDocEvents_FeatureManagerTabActivatedNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当管理器窗格中的活动选项卡更改时激发。
DPartDocEvents_FeatureManagerTabActivatedPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在管理器窗格中的活动选项卡更改之前激发。
DPartDocEvents_FeatureManagerTreeRebuildNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重建活动文档的featuremanager设计树时通知用户程序。
DPartDocEvents_FeatureSketchEditPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户编辑草图定义时,预先通知用户程序。
DPartDocEvents_FileDropPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当部件从Windows资源管理器拖放到部件文档中时,POST会通知用户应用程序。
DPartDocEvents_FileDropPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在将部件从Windows资源管理器拖放到部件文档中之前,预先通知用户应用程序。
DPartDocEvents_FileReloadCancelNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 如果取消了fileReloadNotify,则激发。
DPartDocEvents_FileReloadNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在重新加载零件文档时通知用户程序。
DPartDocEvents_FileReloadPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 重新加载零件文档时预先通知用户程序
DPartDocEvents_FileSaveAsNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) 在显示文件保存对话框之前发送预先通知。
DPartDocEvents_FileSaveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当文件即将保存并传递当前文档名时,预先通知用户程序。
DPartDocEvents_FileSavePostCancelNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 如果未激发fileSavePostNotify,则激发。
DPartDocEvents_FileSavePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在保存零件文档时通知用户程序。
DPartDocEvents_FlipLoopNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当循环翻转时激发。
DPartDocEvents_InsertTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在将表插入零件时通知程序。
DPartDocEvents_LightingDialogCreateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当用户打开照明对话框时激发。
DPartDocEvents_LoadFromStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从第三方IStream存储中安全加载数据时激发。
DPartDocEvents_LoadFromStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 从第三方iStorage存储中安全加载数据时激发。
DPartDocEvents_ModifyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当文档第一次被标记为脏时通知用户程序。
DPartDocEvents_ModifyTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在零件中修改表时通知程序。
DPartDocEvents_NewSelectionNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在选择列表更改时通知用户程序。
DPartDocEvents_OpenDesignTableNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) POST通知应用程序设计表已打开进行编辑。
DPartDocEvents_PreRenameItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当其他文档引用的零件文档即将重命名时激发。
DPartDocEvents_PromptBodiesToKeepNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当一个实体被切割成多个实体时生成。
DPartDocEvents_PublishTo3DPDFNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 将零件文档发布到SolidWorks MBD 3D PDF时激发。
DPartDocEvents_RedoPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在部件文档中发生重做操作后激发。
DPartDocEvents_RedoPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在部件文档中发生重做操作之前激发。
DPartDocEvents_RegenNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当零件文档即将重建时,预先通知用户程序。
DPartDocEvents_RegenPostNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在重建或回滚零件文档时通知用户程序。
DPartDocEvents_RenamedDocumentNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 保存其他文档引用重命名的零件文件的文档时激发。
DPartDocEvents_RenameItemNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在solidworks树结构(如featuremanager设计树或configurationmanager)中重命名项时激发。
DPartDocEvents_SaveToStorageNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在安全地将数据保存到第三方IStream存储时激发。
DPartDocEvents_SaveToStorageStoreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在安全地将数据保存到第三方iStorage存储时激发。
DPartDocEvents_SensorAlertPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在传感器值偏离零件文档中的限制之前触发。
DPartDocEvents_SketchSolveNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在解决草图时激发;例如,在拖动草图实体、添加或编辑关系、更改尺寸等时激发。此事件返回要更新的草图特征的名称。
DPartDocEvents_SuppressionStateChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当功能的抑制状态更改时激发。
DPartDocEvents_UndoPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在部件文档中发生撤消操作后激发。
DPartDocEvents_UndoPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在部件文档中发生撤消操作之前激发。
DPartDocEvents_UnitsChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 文档单位更改时生成。
DPartDocEvents_UserSelectionPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在零件文档中选择实体后激发。
DPartDocEvents_UserSelectionPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当交互用户将光标移到零件文档中的模型视图上或单击该视图时激发。
DPartDocEvents_ViewNewNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在创建新的模型视图窗口时通知用户程序。例如,对于由窗口拆分栏创建的每个新模型视图,都会发送此事件。
DPartDocEvents_WeldmentCutListUpdatePostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 更新此零件中的焊接件切割列表时,POST将通知用户程序。
DSldWorksEvents_ActiveDocChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在活动窗口更改时通知用户程序。此更改可以在同一文档的窗口之间进行,也可以在不同文档的窗口之间进行。
DSldWorksEvents_ActiveModelDocChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在活动的imodeldoc2对象发生更改时通知用户程序。
DSldWorksEvents_BackgroundProcessingEndNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 后台处理结束时通知用户程序。
DSldWorksEvents_BackgroundProcessingStartNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 后台处理启动时通知用户程序。
DSldWorksEvents_BeginRecordNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 宏录制开始时通知用户程序。
DSldWorksEvents_BeginTranslationNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当solidworks应用程序开始导入或导出文件时通知用户程序。
DSldWorksEvents_CommandCloseNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当命令(包括属性管理器页)正常或被用户取消时激发。
DSldWorksEvents_CommandOpenPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在命令(包括属性管理器页)执行或打开之前激发。
DSldWorksEvents_DestroyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当solidworks即将被销毁时,发送到基于mfc或基于com的dll加载项。
DSldWorksEvents_DocumentConversionNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) POST通知用户程序在打开操作期间文件已从旧版本的SolidWorks转换。
DSldWorksEvents_DocumentLoadNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在加载solidworks文档时通知用户程序。
DSldWorksEvents_EndRecordNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 宏录制结束时通知用户程序,包括用户是否取消录制(即,用户从“另存为”对话框中取消并对solidworks“继续录制”说“否”?对话框)。
DSldWorksEvents_EndTranslationNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当solidworks应用程序完成导入或导出文件时通知用户程序。
DSldWorksEvents_FileCloseNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) solidworks关闭文件后通知用户程序。
DSldWorksEvents_FileNewNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) post在创建新文件时通知用户程序。
DSldWorksEvents_FileNewPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在使用solidworks api或solidworks用户界面创建新文档之前激发。
DSldWorksEvents_FileOpenNotify2EventHandler Delegate (SolidWorks.Interop.sldworks) POST通知用户程序何时打开了现有文件。
DSldWorksEvents_FileOpenPostNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) post在文件打开时通知用户程序。
DSldWorksEvents_FileOpenPreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 预先通知用户程序fileopennotify2事件。
DSldWorksEvents_InterfaceBrightnessThemeChangeNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当solidworks背景更改时通知外接程序。
DSldWorksEvents_LightSheetCreateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 创建照明图纸时激发。
DSldWorksEvents_NonNativeFileOpenNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 打开非本机solidworks文件时激发。
DSldWorksEvents_OnIdleNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在处理完所有消息后激发,包括已发布的重绘;因此,无需调用imodeldoc2::graphicsredraw2。
DSldWorksEvents_PromptForFilenameNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在打开的文件中缺少依赖文档时激发。
DSldWorksEvents_PromptForMultipleFileNamesNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当打开的文件中缺少任何依赖文档时激发。
DSldWorksEvents_PropertySheetCreateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在创建导出的iswpropertysheet时通知用户程序,以便应用程序可以向其添加页。
DSldWorksEvents_ReferencedFilePreNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在solidworks开始搜索指定的引用文件之前通知用户程序。
DSldWorksEvents_ReferenceNotFoundNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在solidworks软件显示对话框提示最终用户浏览参考文件之前通知用户程序。
DSWPropertySheetEvents_CreateControlNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在属性页上创建ActiveX控件时激发。
DSWPropertySheetEvents_DestroyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在销毁属性表的过程中激发。
DSWPropertySheetEvents_HelpNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 在属性表上单击“帮助”按钮时激发。
DSWPropertySheetEvents_OnCancelNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 单击属性页上的“取消”按钮时激发。您的外接程序可以在此事件中执行清理活动。
DSWPropertySheetEvents_OnOKNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 单击属性页上的“确定”按钮时激发。
DTaskpaneViewEvents_TaskPaneActivateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当应用程序级任务窗格视图被激活时,POST通知用户程序。
DTaskpaneViewEvents_TaskPaneDeactivateNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当停用应用程序级任务窗格视图时,POST通知用户程序。
DTaskpaneViewEvents_TaskPaneDestroyNotifyEventHandler Delegate (SolidWorks.Interop.sldworks) 当应用程序级任务窗格视图即将被销毁时,预先通知用户程序。
DTaskpaneViewEvents_TaskPaneToolbarButtonClickedEventHandler Delegate (SolidWorks.Interop.sldworks) 单击任务窗格上的工具栏按钮时激发。