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

发布于:2024-05-03 ⋅ 阅读:(118) ⋅ 点赞:(0)

大家好,今天继续介绍我们的枚举应用系列。

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

(1)第一个为swsPVResultCombinationError_e,这个枚举值的含义为结合压力容器设计研究结果时的错误,下面是官方的具体枚举值:

Member Description
swsPVResultCombinationError_AtleastTwoItemsNeeded 2 = You need to specify at least two studies and multiplication factors
swsPVResultCombinationError_CombineAnalysisNotDone 7 = The analysis was not done
swsPVResultCombinationError_CombineIncompatibleConfiguration 10 = Incompatible configurations
swsPVResultCombinationError_CombineIncompatibleConnectors 15 = Incompatible connectors
swsPVResultCombinationError_CombineIncompatibleContact 14 = Incompatible contacts
swsPVResultCombinationError_CombineIncompatibleMesh 9 = Incompatible meshes
swsPVResultCombinationError_CombineIncompatiblePlanarType 16 = Incompatible planar types
swsPVResultCombinationError_CombineIncompatibleRestraints 11 = Incompatible restraints
swsPVResultCombinationError_CombineIncompatibleResults 8 = Incompatible results
swsPVResultCombinationError_CombineIncompatibleShellsMaterials 13 = Incompatible shell materials
swsPVResultCombinationError_CombineIncompatibleSolidsMaterials 12 = Incompatible solid materials
swsPVResultCombinationError_InvalidFactors 5 = One or more multiplication factors are invalid
swsPVResultCombinationError_InvalidStudy 6 = One or more studies are invalid
swsPVResultCombinationError_ItemsNotSameInNumber 4 = Number of elements in the multiplication factors and study names arrays are not the same
swsPVResultCombinationError_NoError 0 = Successful
swsPVResultCombinationError_NotAvailable 1 = Result combination is not available for this study
swsPVResultCombinationError_StudyNamesNotProper 3 = Study names are not valid

(2)第二个为swsResultPlotErrorCode_e,这个枚举值的含义为结果图错误码,下面是官方的具体枚举值:

Member Description
swsResultPlot_CosworksViewNotPresent 16 = Cosmos view is not present
swsResultPlot_EquivalentStressNotApplicable 15 = Equivalent stress plot is not applicable
swsResultPlot_FailedPlotCreation 2 = Plot not created
swsResultPlot_ImproperResultsEquation 13 = Invalid results equation
swsResultPlot_InvalidComponentType 6 = Invalid result component type
swsResultPlot_InvalidExternalResultsFile 17
swsResultPlot_InvalidInputArgInCombiWithTensorVectorFlag 4 = Tensor plot cannot be rendered when "Render Shell in 3D" or "Show plot on selected entities" is selected
swsResultPlot_InvalidIsoValueRange 18
swsResultPlot_InvalidMeshAppliedToStudy 9 = Mesh not compatible with study type
swsResultPlot_InvalidResultType 5 = Invalid result type
swsResultPlot_InvalidSelectedEntities 3 = Invalid selected entities
swsResultPlot_InvalidSmoothingCycleRange 19
swsResultPlot_InvalidStudy 1 = Study is missing important internal components
swsResultPlot_InvalidStudyType 12 = Step numbers not compatible with study type
swsResultPlot_InvalidUnitType 7 = Invalid unit type
swsResultPlot_IsAvailableOnlyForElements 8 = Plot is valid only for elements
swsResultPlot_IsAvailableOnlyForNodes 11 = Plot is valid only for nodes
swsResultPlot_MeshInformationNotFound 20
swsResultPlot_NoError 0 = No error
swsResultPlot_PlotDoesNotExist 14 = Result plot does not exist
swsResultPlot_TryingToSetInvalidProperty 10 = Invalid property

(3)第三个为swsRunAnalysisError_e,这个枚举值的含义为运行分析错误,下面是官方的具体枚举值:

Member Description
swsRunAnalysisDefineInitialTemperature 3 = Define initial temperatures to perform transient thermal analysis
swsRunAnalysisErrorAnalysisFailed 24 = Analysis failed
swsRunAnalysisErrorAuthorizationFailed 22 = Authorization failed for this analysis type
swsRunAnalysisErrorDefineRigidVirtualWallContact 2 = Rigid virtual wall contact must be defined for grounded bolts
swsRunAnalysisErrorEXMaterialPropertyNotDefined 13 = Elastic modulus (EX) material property not defined
swsRunAnalysisErrorEXValue 14 = Elastic modulus (EX) should be >  0.0
swsRunAnalysisErrorInvalidLBC 30 = Invalid load boundary conditions
swsRunAnalysisErrorMaterialNotDefined 19 = Material is not defined
swsRunAnalysisErrorMaterialNotDefinedForComponents 20 = Material is not defined for one or more components
swsRunAnalysisErrorMaterialNotDefinedForShells 18 = Material is not defined for one or more shells
swsRunAnalysisErrorMeshNotFound 23 = Mesh not found; create mesh first
swsRunAnalysisErrorMeshNotIdentical 11 = The mesh is not identical for static studies used in different events
swsRunAnalysisErrorMultipleLoadsUseSameTimeCurve 4 = Multiple loads on an entity should use the same time curve
swsRunAnalysisErrorNeedOneOrMoreStaticStudies 6 = One or more static, nonlinear, or linear dynamic studies needed to perform fatigue analysis; studies containing beams only are excluded
swsRunAnalysisErrorNoFatigueEvent 7 = No fatigue event defined
swsRunAnalysisErrorNoSNCurve 9 = No SN curve available
swsRunAnalysisErrorNoSolidBody 21 = No solid body to process
swsRunAnalysisErrorNoValidShell 12 = No valid shell defined
swsRunAnalysisErrorPadaptiveNotSupportCyclicSymmetry 27 = Cyclic symmetry is incompatible with p-adaptive method
swsRunAnalysisErrorPadaptiveNotSupportLargeDisplacement 26 = Large displacement is incompatible with p-adaptive method
swsRunAnalysisErrorPadaptiveNotSupportNoPenetration 28 = No Penetration contact is incompatible with p-adaptive method
swsRunAnalysisErrorPadaptiveNotSupportRemoteLoadMassGapContactConnector

29 = P-adaptive method does not support:

  • remove load/mass
  • gap contact
  • connectors
swsRunAnalysisErrorPoissonsRatio 15 = Poisson's Ratio should be less than 0.5
swsRunAnalysisErrorRemoveOrChangeCreep 17 = Creep option for material works only with force control method; remove creep or change the control method in the Advanced page of study's properties
swsRunAnalysisErrorSetUpDropTestStudy 5 = Drop test study is not set up
swsRunAnalysisErrorStudyNotExist 25 = Study does not exist
swsRunAnalysisErrorSuccessful 0 = Successful
swsRunAnalysisErrorThermalConductivityNotDefined 16 = Thermal conductivity not defined
swsRunAnalysisErrorTimeDependentOrAmplitideOnlyLoads 8 = All loads should be either time dependent or amplitude only
swsRunAnalysisErrorUseHighQualityMesh 1 = Draft mesh is incompatible with p-adaptive method; use high quality mesh

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