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

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

相关推荐
IT技术分享社区3 分钟前
C#实战:使用腾讯云识别服务轻松提取火车票信息
开发语言·c#·云计算·腾讯云·共识算法
极客代码6 分钟前
【Python TensorFlow】入门到精通
开发语言·人工智能·python·深度学习·tensorflow
疯一样的码农12 分钟前
Python 正则表达式(RegEx)
开发语言·python·正则表达式
&岁月不待人&35 分钟前
Kotlin by lazy和lateinit的使用及区别
android·开发语言·kotlin
StayInLove38 分钟前
G1垃圾回收器日志详解
java·开发语言
无尽的大道1 小时前
Java字符串深度解析:String的实现、常量池与性能优化
java·开发语言·性能优化
爱吃生蚝的于勒1 小时前
深入学习指针(5)!!!!!!!!!!!!!!!
c语言·开发语言·数据结构·学习·计算机网络·算法
binishuaio1 小时前
Java 第11天 (git版本控制器基础用法)
java·开发语言·git
zz.YE1 小时前
【Java SE】StringBuffer
java·开发语言
就是有点傻1 小时前
WPF中的依赖属性
开发语言·wpf