Solid Edge Part Type Library > PartStitchWelds Collection : Add Method |
Visual Basic |
---|
Public Function Add( _ ByVal NumberOfStitchPaths As Long, _ ByRef PartStitchWeldPaths() As Object, _ ByRef StartVertices() As Object, _ ByRef DirectionEdgeForClosedPartStitchWeldPaths() As Object, _ ByRef StitchDirections() As FeaturePropertyConstants, _ ByVal PartStitchWeldType As StitchWeldType, _ ByVal PartStitchWeldAnnotationFormat As StitchWeldAnnotationFormat, _ ByVal StartOffsetLength As Double, _ ByVal EndOffsetLength As Double, _ ByVal BeadMaterialLength As Double, _ ByVal GapLength As Double, _ ByVal PartStitchWeldStyleName As String _ ) As PartStitchWeld |
Value | Description |
---|---|
igAddRound | |
igAll | |
igAlongAnAxis | |
igAngularDummy | |
igAsConstruction | |
igBend | |
igBendAndFaceCornerRelief | |
igBendOnlyCornerRelief | |
igBoth | Feature Properties - Both |
igChainedCornerRelief | |
igChamfer2Setbacks | |
igChamfer45degSetback | |
igChamferAngleSetback | |
igCircular | |
igCloseCornerCircleCutout | |
igCloseCornerClosed | |
igCloseCornerNone | |
igCloseCornerOpen | |
igClosed | |
igCloseFaces | |
igConcave | |
igConstantRadiusArc | |
igConstRadiusRound | |
igContinuous | |
igConvex | |
igCopy | |
igCornerRound | |
igCounterboreHole | |
igCounterboreProfileIsAtBottom | |
igCounterboreProfileIsAtTop | |
igCounterdrillHole | |
igCountersinkHole | |
igCurvatureContinuous | |
igCurvatureContinuousInterior | |
igCurveSetSeperator | |
igDeleteFaceHeal | |
igDelSMFaceBoth | |
igDelSMFaceNone | |
igDelSystemRelief | |
igDelZeroBendRadius | |
igDevelopableSurface | |
igEdgeBasedCrossSection | |
igEdgesByLoop | |
igEdgesByVertex | |
igEnd | |
igEndCaps | |
igEqualOffset | |
igEquationType | |
igExtend | Feature Properties - Extend |
igExtendBendRelief | |
igFacesTouchingCurvesOnly | |
igFilletBendRelief | |
igFinite | |
igFlangeCenterOfEdge | |
igFlangeEndFromEndEdge | |
igFlangeEndOnEndEdge | |
igFlangeFromBothEndsOfEdge | |
igFlangeFromDefinedStartPoint | |
igFlangeFullEdge | |
igFlangeMatchFace | |
igFlangeOffset | |
igFlangeStartFromEndEdge | |
igFlangeStartOnEndEdge | |
igFlatten | |
igFormedEnd | |
igFromNonReferenceEnd | |
igFromReferenceEnd | |
igFromTo | |
igFull | |
igGroove | |
igHemTypeCenteredLoop | |
igHemTypeClosed | |
igHemTypeClosedLoop | |
igHemTypeCurl | |
igHemTypeOpen | |
igHemTypeOpenLoop | |
igHemTypeSFlange | |
igIgnoreBlends | |
igInside | Feature Properties - Remove/Add Material Inside |
igInsideDimension | |
igIntersect | |
igLancedEnd | |
igLeft | Feature Properties - Project to Left |
igLinear | |
igLinearCurvatureContinuousExtension | |
igLinearTangentExtension | |
igLip | |
igLouverFormedEndType | |
igLouverLancedEndType | |
igLouverRound | |
igLouverRoundNone | |
igMitreByAngle | |
igMitreByDist | |
igMitreManufacturingCut | |
igMitreNormalToThickness | |
igMitreParallelToThickness | |
igMitreRegularCut | |
igMove | |
igMultipleEdges | |
igNatural | |
igNeutralFactorFromExcel | |
igNFType | |
igNoCornerRound | |
igNoExtend | Feature Properties - Do Not Extend |
igNone | |
igNonSymmetric | |
igNormal | |
igNormalSideDummy | Feature Properties - Normal Side |
igNoRound | |
igNullConstant | |
igOffset | |
igOutside | Feature Properties - Remove/Add Material Outside |
igOutsideDimension | |
igOverlapFaces | |
igParallelDummy | |
igParallelToPlane | |
igPartingFromCurve | |
igPartingFromEdge | |
igPartingFromPlane | |
igPartingFromSurface | |
igPatternAlongCurve | |
igPatternByTable | |
igPatternCircular | |
igPatternFillRegion | |
igPatternMirror | |
igPatternMountingBoss | |
igPatternRectangular | |
igPatternUserDefined | |
igPeriodic | |
igProfileBasedCrossSection | |
igProjectOptionProject | |
igProjectOptionWrap | |
igPunchedEnd | |
igRadial | |
igRaisedCounterboreSlot | |
igRecessedCounterboreSlot | |
igRecreateBlends | |
igRectangularBendRelief | |
igReflective | |
igRegularHole | |
igRegularSlot | |
igRegularThread | |
igRemoveBoundaries | |
igRemoveExternalBoundaries | |
igRemoveInternalBoundaries | |
igReverseNormal | |
igReverseNormalSideDummy | Feature Properties - Reverse Normal Side |
igRight | Feature Properties - Project to Right |
igRipBendRelief | |
igRipCornerRelief | |
igRndCapAcrossSharpEdges | |
igRndMiterAtCorner | |
igRndPreserveTopologyOff | |
igRndPreserveTopologyOn | |
igRndRollAcrossSharpEdges | |
igRndRollAcrossTangentEdgesOff | |
igRndRollAcrossTangentEdgesOn | |
igRndRollAlongBlendEdgesOff | |
igRndRollAlongBlendEdgesOn | |
igRndRollAroundCorner | |
igRoundAllVertexSetback | |
igRoundEndVertexEdgeSetback | |
igRoundSetbackIsAbsolute | |
igRoundSetbackIsRelative | |
igRoundSingleVertexSetback | |
igRoundStartVertexEdgeSetback | |
igRoundVertexEdgeSetback | |
igShowBoundaries | |
igSideInfoSetSeperator | |
igSingleEdge | |
igSMClearanceCutout | |
igSMFaceCutout | |
igSMMidPlaneCutout | |
igSplit | |
igSplitAngle1Left | |
igSplitAngle1Right | |
igSplitDraft | |
igStart | |
igStepDraft | |
igStepDraftPerpendicular | |
igStraightPipeThread | |
igSubtract | |
igSweepAlignArcLength | |
igSweepAlignNormal | |
igSweepAlignParallel | |
igSweepAlignParametrically | |
igSweepC1Continuity | |
igSweepC2Continuity | |
igSweepMergeAll | |
igSweepMergeAlongPath | |
igSweepMergeNone | |
igSweepScaleNone | |
igSweepScaleStartAndEnd | |
igSweepTwistNone | |
igSweepTwistStartAndEnd | |
igSweepTwistTurns | |
igSweepTwistTurnsPerUnitLength | |
igSymmetric | Feature Properties - Symmetric Extent |
igTangent | |
igTangentInterior | |
igTaperByAngle | |
igTaperByRatio | |
igTaperByRLRatio | |
igTaperDimAtBottom | |
igTaperDimAtTop | |
igTaperedEnd | |
igTaperedHole | |
igTaperedPipeThread | |
igTaperedToPlane | |
igTappedHole | |
igThickness | |
igThkInProfilePlane | |
igThkNormalToProfilePlane | |
igThreeHundredAndSixty | |
igThroughAll | |
igThroughAxis | |
igToEndOfEdge | |
igToggleToConstruction | Toggle from Design to Construction |
igToggleToDesign | Toggle from Construction to Design |
igToKeyPoint | |
igToNext | |
igTreatmentCircleCutout | |
igTreatmentCrown | |
igTreatmentDraft | |
igTreatmentFormedFeatureDisplayAsCenterMark | |
igTreatmentFormedFeatureDisplayAsModeled | |
igTreatmentFormedFeatureDisplayAsSketch | |
igTreatmentFormedFeatureDisplayAsSketchAndCenterMark | |
igTreatmentIntersect | |
igTreatmentMiterRelief | |
igTreatmentOff | |
igTreatmentRectangularCutout | |
igTreatmentUCutout | |
igTreatmentVCutout | |
igUnequalOffset | |
igUnite | |
igUShaped | |
igVarRadiusRound | |
igVBottomDimToFlat | |
igVBottomDimToV | |
igVShaped | |
igWeldGrooveCapProject | |
igWeldGrooveCapSameAsTop | |
igWeldGrooveCapSurface |
Value | Description |
---|---|
seOffsetsOnly | The operation is performed on the offsets only. |
seStitchOnly | The operation is performed on the stitch only. |
seStitchPlusOffsets | The operation is performed on both the offsets and the stitch. |
Value | Description |
---|---|
seLengthPitch | The annotation is formatted as bead length and pitch. |
seNXL | The annotation is formatted as the number of beads multiplied by the bead length. |
seNXL_E | The annotation is formatted as the number of beads multiplied by the bead length, plus the gap length. |
Imports System.IO Imports System.Runtime.InteropServices Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim objFolder As DirectoryInfo Dim objFileInfo As FileInfo Dim objApp As SolidEdgeFramework.Application = Nothing Dim objPartDoc As SolidEdgePart.PartDocument = Nothing Dim FilletWelds As SolidEdgePart.PartFilletWelds = Nothing Dim FilletWeld As SolidEdgePart.PartFilletWeld = Nothing Dim objDocuments As SolidEdgeFramework.Documents = Nothing Dim iNumBaseFaces As Integer Dim iNumTargetFaces As Integer Dim dBaseThickness As Double Dim dTargetThickness As Double Dim eSetbackType As SolidEdgePart.FilletWeldSetbackConstants Dim objBaseFaces(0) As SolidEdgeGeometry.Face Dim objTargetFaces(0) As SolidEdgeGeometry.Face Dim objFaceArray(0) As SolidEdgeGeometry.Face Dim objExtProt1 As SolidEdgePart.ExtrudedProtrusion = Nothing Dim objRib As SolidEdgePart.Rib = Nothing Dim objFaces As SolidEdgeGeometry.Faces = Nothing Dim objFace As SolidEdgeGeometry.Face = Nothing Dim objModel As SolidEdgePart.Model Dim LabelWeldDC As SolidEdgePart.LabelWeldDataCollection Dim LabelWeldObject As SolidEdgePart.LabelWeldData Dim FilletEdges As SolidEdgeGeometry.Edges Dim FilletEdge(0) As SolidEdgeGeometry.Edge Dim FilletEdgeVertex(0) As SolidEdgeGeometry.Vertex Dim iNumOfFillets As Integer = 0 Dim OrientingEdgeProxy(1) As Object Dim OrientingSides(1) As SolidEdgePart.FeaturePropertyConstants Dim dStartOffset As Double Dim dEndOffset As Double Dim dGapLength As Double Dim dBeadLength As Double Dim StitchWelds As SolidEdgePart.PartStitchWelds Dim StitchWeld As SolidEdgePart.PartStitchWeld Dim eOrientingSide As SolidEdgePart.FeaturePropertyConstants Dim eWeldType As SolidEdgePart.StitchWeldType Dim eAnnotFormat As SolidEdgePart.StitchWeldAnnotationFormat Dim iNumSkipPaths As Integer Dim strStyleName As String Try objFolder = GetTrainingFolder() objFileInfo = New FileInfo(Path.Combine(objFolder.FullName, "support1.par")) objApp = Marshal.GetActiveObject("SolidEdge.Application") objApp.Visible = True objDocuments = objApp.Documents ' First open the test case document from training folder objPartDoc = objDocuments.Open(objFileInfo.FullName) objPartDoc.ModelingMode = SolidEdgePart.ModelingModeConstants.seModelingModeOrdered ' Get model handle objModel = objPartDoc.Models.Item(1) 'Get Label Weld Data object LabelWeldDC = objPartDoc.LabelWeldDataCollection LabelWeldObject = LabelWeldDC.Add(ZSymbol:=0, Tail:=0, DashLine:=0, WeldInField:=0, OffsetTopBottom:=0, WeldAllAround:=0, Symmetrical:=0, TopNote1:="Test1", TopNote2:="Test2", TopTreatmentType:=0, TopType:=0, TopNote3:="Test3", TopNoteZ:="", TailNote:="", BottomNote1:="", BottomNote2:="", BottomTreatmentType:=0, BottomType:=0, BottomNote3:="", BottomNoteZ:="", TopTypeCompound:=0, BottomTypeCompound:=0, CenterType:=0, CrossSectionArea:=0, TailNote2:="", TopNoteCSize:="", BottomNoteCSize:="", TopNoteAngle:="", BottomNoteAngle:="", TopNoteDepth:="", BottomNoteDepth:="", TopPosOffset:=0, BottomPosOffset:=0) 'Get Fillet weld collection FilletWelds = objModel.PartFilletWelds ' Get Protrusion 1 objExtProt1 = objModel.ExtrudedProtrusions.Item(2) ' Get all base faces collection objFaces = objExtProt1.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll) ' Collect INPUT Base faces objBaseFaces(0) = objFaces.Item(3) 'Get Rib objRib = objModel.Ribs.Item(2) ' Get all target faces collection objFaces = objRib.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll) ' Collect INPUT Target faces objTargetFaces(0) = objFaces.Item(3) 'Apply face styles to selected faces for identification objBaseFaces(0).Style = objPartDoc.FaceStyles("red") objTargetFaces(0).Style = objPartDoc.FaceStyles("red") ' Initialize all inputs iNumBaseFaces = 1 iNumTargetFaces = 1 eSetbackType = SolidEdgePart.FilletWeldSetbackConstants.seFilletWeldThickness dBaseThickness = 0.00235 dTargetThickness = 0.0025 ' Add a new Fillet weld FilletWeld = FilletWelds.Add(iNumBaseFaces, objTargetFaces, iNumTargetFaces, objBaseFaces, LabelWeldObject, eSetbackType, dBaseThickness, dTargetThickness) ' Get all base faces collection FilletEdges = FilletWeld.Edges(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll) ' Collect INPUT edge FilletEdge(0) = FilletEdges.Item(8) 'Input vertex FilletEdgeVertex(0) = FilletEdge(0).StartVertex ' Initialize all inputs iNumSkipPaths = 1 ' Orientation side OrientingSides(0) = eOrientingSide 'Weld Type eWeldType = SolidEdgePart.StitchWeldType.seStitchOnly 'Annotation type eAnnotFormat = SolidEdgePart.StitchWeldAnnotationFormat.seLengthPitch ' Distance values dStartOffset = 0.0 dEndOffset = 0.0 dBeadLength = 0.003 dGapLength = 0.004 ' Dimension Style strStyleName = "ISO (mm)" StitchWelds = objModel.PartStitchWelds ' Add a new Fillet weld StitchWeld = StitchWelds.Add(iNumSkipPaths, FilletEdge, FilletEdgeVertex, OrientingEdgeProxy, OrientingSides, eWeldType, eAnnotFormat, dStartOffset, dEndOffset, dBeadLength, dGapLength, strStyleName) If Err.Number() Or StitchWeld Is Nothing Then MsgBox("Could not create a stitch weld with the inputs.") End If Catch ex As Exception MsgBox(ex.ToString) Finally If Not objPartDoc Is Nothing Then LabelWeldObject = Nothing LabelWeldDC = Nothing FilletWeld = Nothing FilletWelds = Nothing objPartDoc.Close() objPartDoc = Nothing End If objApp = Nothing End Try End Sub Function GetTrainingFolder() As DirectoryInfo Dim objInstallData As SEInstallDataLib.SEInstallData = Nothing Dim objInstallFolder As DirectoryInfo = Nothing Dim objTrainingFolder As DirectoryInfo = Nothing Try objInstallData = New SEInstallDataLib.SEInstallData objInstallFolder = New DirectoryInfo(objInstallData.GetInstalledPath()) objTrainingFolder = New DirectoryInfo(Path.Combine(objInstallFolder.Parent.FullName, "Training")) Catch Finally If Not (objInstallData Is Nothing) Then Marshal.FinalReleaseComObject(objInstallData) objInstallData = Nothing End If End Try Return objTrainingFolder End Function End Class