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

大家好,今天是我们枚举应用的第五讲。

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

(1)第一个枚举为swConStraintType_e,这个枚举为草图约束,下面是官方的具体枚举值:

Member Description
swConstraintType_ALONGX 48
swConstraintType_ALONGX3D 64
swConstraintType_ALONGXPOINTS 51
swConstraintType_ALONGXPOINTS3D 66
swConstraintType_ALONGY 49
swConstraintType_ALONGY3D 65
swConstraintType_ALONGYPOINTS 52
swConstraintType_ALONGYPOINTS3D 67
swConstraintType_ALONGZ 50
swConstraintType_ALONGZPOINTS 53
swConstraintType_ANGLE 2
swConstraintType_ANGLE3P 43
swConstraintType_ARCANG180 19
swConstraintType_ARCANG270 20
swConstraintType_ARCANG90 18
swConstraintType_ARCANGBOTTOM 22
swConstraintType_ARCANGLEFT 23
swConstraintType_ARCANGRIGHT 24
swConstraintType_ARCANGTOP 21
swConstraintType_ARCLENGTH 44
swConstraintType_ATINTERSECT 13
swConstraintType_ATMIDDLE 12
swConstraintType_ATPIERCE 40
swConstraintType_BELTTRACTION 69
swConstraintType_BLOCKFIXEDLOCK 70 = Lock two blocks together
swConstraintType_BLOCKNORMALLOCK 71 = Lock blocks to be normal to one another (3D sketch)
swConstraintType_BLOCKROTATELOCK 72 = Lock blocks to rotate around each other (3D sketch)
swConstraintType_C3TOUCH 83
swConstraintType_CIRCULARPATTCNT 77
swConstraintType_COINCIDENT 9
swConstraintType_COLINEAR 27
swConstraintType_CONCENTRIC 10
swConstraintType_CONICRHO 82
swConstraintType_CORADIAL 28
swConstraintType_DIAMETER 15
swConstraintType_DISTANCE 1
swConstraintType_DOUBLEANGLE 84 = Double angle display
swConstraintType_DOUBLEDISTANCE 41
swConstraintType_ELLIPSEANG180 34
swConstraintType_ELLIPSEANG270 35
swConstraintType_ELLIPSEANG90 33
swConstraintType_ELLIPSEANGBOTTOM 37
swConstraintType_ELLIPSEANGLEFT 38
swConstraintType_ELLIPSEANGRIGHT 39
swConstraintType_ELLIPSEANGTOP 36
swConstraintType_EQUALCURV3DALIGN 80 = Aligned equal curvature between 3D splines
swConstraintType_EQUALCURVATURE 61
swConstraintType_EQUALTANGENT 62
swConstraintType_FAKESLOTCONSTRAINT 73 = Not actually a constraint; for display purposes only
swConstraintType_FITSPLINE 60
swConstraintType_FIXED 17
swConstraintType_FIXEDSLOT 74 = Fix a slot
swConstraintType_FLANGEFACEDIST 81 = Distance from virtual point to the relevant flange face
swConstraintType_HORIZONTAL 4
swConstraintType_HORIZPOINTS 25
swConstraintType_INTERSECTION 56
swConstraintType_INVALIDCTYPE 0
swConstraintType_ISOBYPOINT 58 = ISO curve when its constraint parameter is determined by an external point
swConstraintType_LINEARPATTCNT 76
swConstraintType_MERGEPOINTS 42
swConstraintType_NORMAL 45
swConstraintType_NORMALPOINTS 46
swConstraintType_OFFSETEDGE 16
swConstraintType_PARALLEL 7
swConstraintType_PARALLELYZ 54
swConstraintType_PARALLELZX 55
swConstraintType_PATTERNED 57
swConstraintType_PERPENDICULAR 8
swConstraintType_PLANAROFFSET 79 = For routing pipe offsets
swConstraintType_RADIALOFFSET 78 = For routing pipe offsets
swConstraintType_RADIUS 3
swConstraintType_SAMECURVELENGTH 85 = Equal arc/spline length
swConstraintType_SAMEISOPARAM 59 = Common relation for all pieces ( for the face ) of the surface's iso curve
swConstraintType_SAMELENGTH 14
swConstraintType_SAMESLOTS 75 = Same slot width and length
swConstraintType_SKETCHOFFSET 47 = Between entities of the same sketch
swConstraintType_SNAPANGLE 31
swConstraintType_SNAPGRID 29
swConstraintType_SNAPLENGTH 30
swConstraintType_SYMMETRIC 11
swConstraintType_TANGENT 6
swConstraintType_TANGENTFACE 63
swConstraintType_TRACTION 68
swConstraintType_USEEDGE 32
swConstraintType_VERTICAL 5 = Applies only to sketch lines
swConstraintType_VERTPOINTS 26 = Applies only to sketch points

(2)第二个为swDesignTableErrors_e,这个枚举值为设计表的错误,下面是官方的具体枚举值:

Member Description
swDTbCannotOpen 27
swDTblCfgInvalid 1
swDTblCorrupt 2
swDTblCurrentlyEditing 5
swDTblDataInvalidComponetState 15
swDTblDataInvalidFeatureState 16
swDTblDisplayStateError 18
swDTblExiting 3
swDTblFileNotFound 8
swDTblInvalidColCustomProp 10
swDTblInvalidColumnDimName 11
swDTblInvalidColumnFeatName 12
swDTblInvalidColumnKeyWord 13
swDTblInvalidColumnValue 9
swDTblInvalidConfigName 14
swDTblInvalidRowNameKeyword 21
swDTblInvalidYesNoData 17
swDTblLinkChanged 7
swDTblModelFeatRequired 19
swDTblNegitiveDimension 25
swDTblNoError 0
swDTblNoFileName 4
swDTblNotSuppressible 23
swDTblParentConfigInvalid 20
swDTblTableIsEmpty 24
swDTblTolTypeInvalid 22
swDTblTooManyColumns 6
swDTbUnUsedConfiguration 26
swDTConfigCircularDefinition 33
swDTDimAngleValueRangeError 31
swDTDimValueRangeError 30
swDTInvalidComponentName 28
swDTInvalidEquation 32
swDTNeedsComponent 29

(3)第三个为swFaultEntityErrorCode_e,这个枚举为实体故障错误码,下面是官方具体的枚举值:

Member Description
swBodyCorrupt 1 = Data structure is corrupt
swBodyInsideOut 3 = Body is inside out
swBodyInvalidIdentifiers 2 = Body has invalid or duplicate identifiers
swBodyRegionsInconsistent 4 = Regions of body are inconsistent
swEdgeBadFaceOrder 14 = On a non-manifold edge, the face order around the edge does not match the order of the faces' surfaces around the edge
swEdgeBadWire 15 = Two wireframe edges intersect at a position other than a vertex
swEdgeNonPeriodicCurve 5 = Open or non-periodic curve on ring edge
swEdgeNonPeriodicNomGeom 6 = Open or non-periodic nominal geometry on ring edge
swEdgeSpcurveOutOfTol 11 = Spcurve not within edge's tolerance
swEdgeSpcurveOutOfTolNomGeom 12 = Spcurve not within edge's tolerance of nominal geometry
swEdgeTouchEdge 36 = Edges touch
swEdgeVertexNotLie 7 = Vertex does not lie on edge's curve
swEdgeVertexNotLieNomGeom 8 = Vertex does not lie on nominal geometry
swEdgeVerticesTouch 13 = Vertices of edge touch
swEdgeWrongDir 9 = Curve in wrong direction for edge
swEdgeWrongDirNomGeom 10 = Nominal geometry in wrong direction
swEntityStateInvalid 34 = State of entity is invalid
swFaceBadEdge 17 = Edge does not lie on face's surface
swFaceBadEdgeOrder 18 = Edge order around the face does not match the order of the edges' curves around the face
swFaceBadLoops 20 = Loops inconsistent
swFaceBadVertex 16 = Vertex does not lie on face's surface
swFaceBadWireframe 22 = A wireframe edge intersects a face at a position other than a vertex
swFaceCheckerFailure 23 = Checker failure during face/face check
swFaceFaceInconsistency 24 = Inconsistent faces
swFaceNoAccomVertex 19 = A surface singularity has no accompanying vertex
swFaceSelfIntersecting 21 = Face is self intersecting
swGeomDegenerate 26 = Geometry degenerated
swGeomStateSelfIntersect 25 = Geometry is self intersecting
swRegionBadShells 27 = Inconsistent shells
swShellBadTopologyGeometry 28 = A topological entity belonging to a shell is not geometrically within the shell
swShellIntersect 29 = Shell shell inconsistency
swTopolMissingGeometry 35 = Missing geometry
swTopolNotG1Continuous 30 = Topology's geometry is not G1 continuous
swTopolSizeBoxViolation 31 = Some or all of entity is outside size box
swTopolStateCheckFail 32 = Checker failure
swTopolStateNoGeometry 33 = Missing geometry

(4)第四个为swKernelErrorCode_e,这个枚举为内核错误码,下面是官方的具体枚举值:

Member Description
swErrorBodyDontKnit -101041
swErrorCheckFailed -105061
swErrorCheckFailed2 -113812
swErrorCurveDiscontinuous -100131
swErrorCurveShort -101057
swErrorEdgeIncorrectOrder -116406
swErrorEdgeisectInvalid -116404
swErrorError 0
swErrorFacecheckFailed -113829
swErrorFaceFaceInconsistent -113816
swErrorFaceRedundant -116402
swErrorFailed -101063
swErrorGeometryDegenerate -113806
swErrorGeometryDiscontinuous -113827
swErrorGeometryMissing -113803
swErrorGeometrySelfx -113805
swErrorHasInvalidentity -101004
swErrorInconsistentDirs -116403
swErrorInvalidEntity -100914
swErrorInvalidGeometry -100999
swErrorInvalidGeometry2 -113808
swErrorInvalidKnots -100978
swErrorInvalidLoop -116405
swErrorInvalidParameter -100120
swErrorInvalidPattern -101042
swErrorInvalidSharing -100921
swErrorLoopsInconsistent -113826
swErrorNotEntity -100022
swErrorSuccess 1
swErrorSurfaceDiscontinuous -100129
swErrorTopologySelfx -113804
swErrorUnknown -1
swErrorVertexNotOnCurve -113818
swErrorVerticesTouch -113821

本篇文章要介绍的就是这么多,我们下篇文章再见。

相关推荐
数据小爬虫@4 分钟前
如何高效利用Python爬虫按关键字搜索苏宁商品
开发语言·爬虫·python
ZJ_.6 分钟前
WPSJS:让 WPS 办公与 JavaScript 完美联动
开发语言·前端·javascript·vscode·ecmascript·wps
Narutolxy11 分钟前
深入探讨 Go 中的高级表单验证与翻译:Gin 与 Validator 的实践之道20241223
开发语言·golang·gin
Hello.Reader19 分钟前
全面解析 Golang Gin 框架
开发语言·golang·gin
禁默29 分钟前
深入浅出:AWT的基本组件及其应用
java·开发语言·界面编程
Jasmine_llq36 分钟前
《 火星人 》
算法·青少年编程·c#
Code哈哈笑39 分钟前
【Java 学习】深度剖析Java多态:从向上转型到向下转型,解锁动态绑定的奥秘,让代码更优雅灵活
java·开发语言·学习
程序猿进阶42 分钟前
深入解析 Spring WebFlux:原理与应用
java·开发语言·后端·spring·面试·架构·springboot
qq_4336184444 分钟前
shell 编程(二)
开发语言·bash·shell
charlie1145141911 小时前
C++ STL CookBook
开发语言·c++·stl·c++20