C# Solidworks二次开发:枚举应用实战(第九讲)

2024-04-28 20:44

本文主要是介绍C# Solidworks二次开发:枚举应用实战(第九讲),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

大家好,今天还是介绍我们的枚举应用实战系列。

下面是今天要介绍的枚举:

(1)第一个为swsBearingLoadEndEditError_e,这个枚举值的含义为轴承载荷编辑错误,下面是官方的具体枚举值:

MemberDescription
swsBearingLoadEndEditErrorBodyExcludedFromAnalysis

17 = Selected entity is on a body excluded from analysis

swsBearingLoadEndEditErrorCoordinateSystemCylindricalFaces

1 = Coordinate system and set of cylindrical faces must be the same radii and z axis of coordinate system must be coincident with the axis of the cylindrical faces

swsBearingLoadEndEditErrorEntityExists

3 = Entity already exists

swsBearingLoadEndEditErrorHasBeamBody

9 = Bearing load has a beam body

swsBearingLoadEndEditErrorHasMassElement

8 = Bearing load has a mass element

swsBearingLoadEndEditErrorIncorrectOrNullEntity

2 = Incorrect or NULL entity

swsBearingLoadEndEditErrorIndexExceedsNumberOfEntities

10 = Specified index exceeds the number of entities

swsBearingLoadEndEditErrorNoEntity

11 = No entity

swsBearingLoadEndEditErrorNoEntityAtIndex

5 = No entity at specified index

swsBearingLoadEndEditErrorNullEntity

16 = Entity is NULL

swsBearingLoadEndEditErrorSelectFace

4 = Select a face

swsBearingLoadEndEditErrorSelectFaceWithCylindricalSurface

7 = Select a face with cylindrical surface

swsBearingLoadEndEditErrorSelectForceDirection

13 = Select one force direction

swsBearingLoadEndEditErrorSelectOneForceDirection

12 = Select one force direction, not both force directions

swsBearingLoadEndEditErrorSetXDirection

14 = Set X direction to 0 or 1

swsBearingLoadEndEditErrorSetYDirection

15 = Set Y direction to 0 or 1

swsBearingLoadEndEditErrorSpecifyValue

6 = Specify a value > 0           

swsBearingLoadEndEditErrorSuccessful

0 = Successful

(2)第二个为swsBoltConnectorEndEditError_e,这个枚举的含义为螺栓连接器编辑错误,下面是官方的具体枚举值:

MemberDescription
swsBoltConnectorEndEditErrorBodyExcludedFromAnalysis40 = Entity is on a body excluded from analysis
swsBoltConnectorEndEditErrorBodyHasBeamElement42 = Body has a beam element
swsBoltConnectorEndEditErrorBodyHasMassElement39 = Body has a mass element
swsBoltConnectorEndEditErrorBoltDiameterBiggerShankContactFaceDiameter25 = Bolt diameter cannot be greater than the minimum shank contact face diameter
swsBoltConnectorEndEditErrorDefineMaterial13 = Define a material
swsBoltConnectorEndEditErrorDocumentIsPart30 = Document type is part
swsBoltConnectorEndEditErrorEntityAlreadyExits27 = Entity already exists
swsBoltConnectorEndEditErrorEntitySelectionBoxesEmpty34 = Both entity selection boxes are empty
swsBoltConnectorEndEditErrorIncorrectHeadDiameter3 = Head diameter is either <= 0 or > the maximum value
swsBoltConnectorEndEditErrorIncorrectNutDiameter29 = Nut diameter is either < 0 or > maximum value
swsBoltConnectorEndEditErrorIncorrectShankDiameter7 = Shank diameter is <= 0 or > the maximum value
swsBoltConnectorEndEditErrorInvalidConnectionType44
swsBoltConnectorEndEditErrorInvalidForAnalysis43
swsBoltConnectorEndEditErrorNoEntity28 = No entity specified
swsBoltConnectorEndEditErrorNoMultiBoltSelected38 = Entity cannot be inserted because multi-bolt not selected
swsBoltConnectorEndEditErrorNoObjectAtIndex33 = No object at specified index
swsBoltConnectorEndEditErrorNoShearEffectSelected37 = Entity cannot be inserted because shear effect not selected
swsBoltConnectorEndEditErrorNullEntity41 = Entity is NULL
swsBoltConnectorEndEditErrorSelectBoltHeadAndNut17 = Select a bolt head and bolt nut from different bodies
swsBoltConnectorEndEditErrorSelectBoltNut26 = Select a bolt nut
swsBoltConnectorEndEditErrorSelectCircularEdge5 = Select a circular edge
swsBoltConnectorEndEditErrorSelectCoaxialCylindricalSurfaces23 = Select co-axial cylindrical surfaces from different components
swsBoltConnectorEndEditErrorSelectConcentricCylindricalFaces24 = Select concentric cylindrical faces from two bodies
swsBoltConnectorEndEditErrorSelectConcentricEntities9 = Select concentric entities
swsBoltConnectorEndEditErrorSelectConicalFaceAndBoltNut19 = Select conical face and bolt nut from different bodies
swsBoltConnectorEndEditErrorSelectConicalFaceAndFaceForThread20 = Select conical face and face for thread from different bodies
swsBoltConnectorEndEditErrorSelectConicalSurface2 = Select a conical surface
swsBoltConnectorEndEditErrorSelectCylindricalThreadFace6 = Select cylindrical thread face from a different body
swsBoltConnectorEndEditErrorSelectEdge4 = Select an edge
swsBoltConnectorEndEditErrorSelectEdgesOnShells32 = Select edges on shells
swsBoltConnectorEndEditErrorSelectFace1 = Select a face
swsBoltConnectorEndEditErrorSelectFaceForHeadNutFaceForThread18 = Select face for the head nut and face for the thread from different bodies
swsBoltConnectorEndEditErrorSelectFacesFromMultilayerBolt22 = Select faces from multi-layer bolt
swsBoltConnectorEndEditErrorSelectMass8 = Select a mass > 0
swsBoltConnectorEndEditErrorSelectNutOrHead31 = Select a nut or head
swsBoltConnectorEndEditErrorSelectOneEntity35 = Can only select one entity per selection box
swsBoltConnectorEndEditErrorSelectPlanarFace16 = Select a planar face
swsBoltConnectorEndEditErrorSelectReferencePlane21 = Sleect a reference plane
swsBoltConnectorEndEditErrorSpecifyFrictionValue15 = Specify a friction value >= 0 and <= 1
swsBoltConnectorEndEditErrorSpecifyPoissonsRatio12 = Specify a Poissons ratio >= 0 but <= 1
swsBoltConnectorEndEditErrorSpecifyPreloadValue14 = Specify a preload value >= 0
swsBoltConnectorEndEditErrorSpecifyTemperatureCoefficient11 = Specify a temperature coefficient >= 0
swsBoltConnectorEndEditErrorSpecifyYoungModulus10 = Specify a young Modulus > 0
swsBoltConnectorEndEditErrorSuccessful0 = Successful
swsBoltConnectorEndEditErrorTooManyEntities36 = Number of entities specified is greater than the number of entities in the selection box

(3)第三个为swsFatigueEventEndEditError_e,这个枚举的含义为疲劳事件编辑错误,下面是官方的具体枚举值:

MemberDescription
swsFatigueEventError_AssociatedStudyShouldBeStaticNonlinearOrDynamicModalTimeHistory21 = Associated study should be a static, nonlinear, or dynamic modal time history study
swsFatigueEventError_CannotApplyLoadingRatio12 = Loading ratio is invalid
swsFatigueEventError_CannotApplyRepeats13 = Cannot apply the specified number of repeats
swsFatigueEventError_CannotApplyStartTime15 = Cannot apply the specified start time of the fatigue event
swsFatigueEventError_ImproperEvent2 = Improper fatigue event
swsFatigueEventError_ImproperNoOfCycles10 = Number of cycles must be greater than 1 and less than 2000000000
swsFatigueEventError_ImproperStudy1 = Improper fatigue study
swsFatigueEventError_ImproperStudyNames3 = Improper associated study names
swsFatigueEventError_ImproperVarNamesOrVarScalesOrVarSteps18 = Improper variable names, scales, or steps
swsFatigueEventError_InvalidLoadingtype11 = Loading type must be a number as defined in swsFatigueLoadingType_e
swsFatigueEventError_InvalidRepeats14 = Number of repeats must be greater than 0 and less than 1000000
swsFatigueEventError_InvalidStartTime16 = Start time must be greater than 0
swsFatigueEventError_LoadHistoryCurveTypeImproper4 = Load history curve type must be a number as defined in swsFatigueLoadHistoryCurveType_e
swsFatigueEventError_NoError0 = Success
swsFatigueEventError_NoOfPointsShouldBeMoreThan38 = Load history curve data must have more than 3 points 
swsFatigueEventError_NumberOfStudiesAssociationShouldbeAtleast119 = Number of associated studies must be greater than 1
swsFatigueEventError_NumberOfStudiesAssociationShouldbeAtleast220 = Number of associated studies must be greater than 2
swsFatigueEventError_StudyNamesScalesAndStepsDifferentInNumber17 = Study names, scales, and steps are all different in number
swsFatigueEventError_XAndYPointsNotSameInNumber7 = X and Y values of the load history curve data are not the same in number
swsFatigueEventError_XCurveDataImproper5 = X values of load history curve data are improper
swsFatigueEventError_XPointsShouldBeInIncreasingOrder9 = X coordinate values of the load history curve data must be in order of increasing value
swsFatigueEventError_YCurveDataImproper6 = Y values of load history curve data are improper
本篇文章要介绍的就是这么多,我们下篇文章再见。

这篇关于C# Solidworks二次开发:枚举应用实战(第九讲)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/944221

相关文章

C#使用HttpClient进行Post请求出现超时问题的解决及优化

《C#使用HttpClient进行Post请求出现超时问题的解决及优化》最近我的控制台程序发现有时候总是出现请求超时等问题,通常好几分钟最多只有3-4个请求,在使用apipost发现并发10个5分钟也... 目录优化结论单例HttpClient连接池耗尽和并发并发异步最终优化后优化结论我直接上优化结论吧,

Golang操作DuckDB实战案例分享

《Golang操作DuckDB实战案例分享》DuckDB是一个嵌入式SQL数据库引擎,它与众所周知的SQLite非常相似,但它是为olap风格的工作负载设计的,DuckDB支持各种数据类型和SQL特性... 目录DuckDB的主要优点环境准备初始化表和数据查询单行或多行错误处理和事务完整代码最后总结Duck

C#使用yield关键字实现提升迭代性能与效率

《C#使用yield关键字实现提升迭代性能与效率》yield关键字在C#中简化了数据迭代的方式,实现了按需生成数据,自动维护迭代状态,本文主要来聊聊如何使用yield关键字实现提升迭代性能与效率,感兴... 目录前言传统迭代和yield迭代方式对比yield延迟加载按需获取数据yield break显式示迭

c# checked和unchecked关键字的使用

《c#checked和unchecked关键字的使用》C#中的checked关键字用于启用整数运算的溢出检查,可以捕获并抛出System.OverflowException异常,而unchecked... 目录在 C# 中,checked 关键字用于启用整数运算的溢出检查。默认情况下,C# 的整数运算不会自

C#实现获得某个枚举的所有名称

《C#实现获得某个枚举的所有名称》这篇文章主要为大家详细介绍了C#如何实现获得某个枚举的所有名称,文中的示例代码讲解详细,具有一定的借鉴价值,有需要的小伙伴可以参考一下... C#中获得某个枚举的所有名称using System;using System.Collections.Generic;usi

C# 读写ini文件操作实现

《C#读写ini文件操作实现》本文主要介绍了C#读写ini文件操作实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 目录一、INI文件结构二、读取INI文件中的数据在C#应用程序中,常将INI文件作为配置文件,用于存储应用程序的

C#实现获取电脑中的端口号和硬件信息

《C#实现获取电脑中的端口号和硬件信息》这篇文章主要为大家详细介绍了C#实现获取电脑中的端口号和硬件信息的相关方法,文中的示例代码讲解详细,有需要的小伙伴可以参考一下... 我们经常在使用一个串口软件的时候,发现软件中的端口号并不是普通的COM1,而是带有硬件信息的。那么如果我们使用C#编写软件时候,如

C#中图片如何自适应pictureBox大小

《C#中图片如何自适应pictureBox大小》文章描述了如何在C#中实现图片自适应pictureBox大小,并展示修改前后的效果,修改步骤包括两步,作者分享了个人经验,希望对大家有所帮助... 目录C#图片自适应pictureBox大小编程修改步骤总结C#图片自适应pictureBox大小上图中“z轴

使用C#代码计算数学表达式实例

《使用C#代码计算数学表达式实例》这段文字主要讲述了如何使用C#语言来计算数学表达式,该程序通过使用Dictionary保存变量,定义了运算符优先级,并实现了EvaluateExpression方法来... 目录C#代码计算数学表达式该方法很长,因此我将分段描述下面的代码片段显示了下一步以下代码显示该方法如

C#实现WinForm控件焦点的获取与失去

《C#实现WinForm控件焦点的获取与失去》在一个数据输入表单中,当用户从一个文本框切换到另一个文本框时,需要准确地判断焦点的转移,以便进行数据验证、提示信息显示等操作,本文将探讨Winform控件... 目录前言获取焦点改变TabIndex属性值调用Focus方法失去焦点总结最后前言在一个数据输入表单