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

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

相关推荐
masa0104 分钟前
JavaScript--JavaScript基础
开发语言·javascript
拓端研究室TRL7 分钟前
Python用TOPSIS熵权法重构粮食系统及期刊指标权重多属性决策MCDM研究|附数据代码...
开发语言·python·重构
一只特立独行的猪6111 小时前
Java面试——集合篇
java·开发语言·面试
大得3692 小时前
go注册中心Eureka,注册到线上和线下,都可以访问
开发语言·eureka·golang
小珑也要变强3 小时前
队列基础概念
c语言·开发语言·数据结构·物联网
吃饭只吃七分饱5 小时前
arm开发板通信
arm开发·c#
AI原吾6 小时前
掌握Python-uinput:打造你的输入设备控制大师
开发语言·python·apython-uinput
机器视觉知识推荐、就业指导6 小时前
Qt/C++事件过滤器与控件响应重写的使用、场景的不同
开发语言·数据库·c++·qt
毕设木哥6 小时前
25届计算机专业毕设选题推荐-基于python的二手电子设备交易平台【源码+文档+讲解】
开发语言·python·计算机·django·毕业设计·课程设计·毕设
珞瑜·6 小时前
Matlab R2024B软件安装教程
开发语言·matlab