Solid Edge Part Type Library
AddByCenter Method
X-Coordinate of the center point of the rectangle.
Y-Coordinate of the center point of the rectangle.
Z-Coordinate of the center point of the rectangle.
Width of the rectangle.
Height of the rectangle.
Rotation angle of the rectangle.
Depth of the box feature.
Reference plane object on which the rectangle will be constructed.
Specifies the direction in which material needs to be added.
Specifies whether to use key point of an object or not.
Key point object for the extent (will be used only if vbKeyPointExtent is VARIANT_TRUE)
Helps find tangent key point on cylinders, spheres and cones. This will be used only when vbKeyPointExtent  is VARIANT_TRUE and pKeyPointObj  is passed in.
Description
Add a box by specifying the center point, width, height, angle, depth and plane for the underlying rectangular profile.
Syntax
Visual Basic
Public Function AddByCenter( _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal z As Double, _
   ByVal dWidth As Double, _
   ByVal dHeight As Double, _
   ByVal dAngle As Double, _
   ByVal dDepth As Double, _
   ByVal pPlane As Object, _
   ByVal ExtentSide As FeaturePropertyConstants, _
   ByVal vbKeyPointExtent As Boolean, _
   ByVal pKeyPointObj As Object, _
   ByRef pKeyPointFlags As KeyPointExtentConstants _
) As BoxFeature
Parameters
x
X-Coordinate of the center point of the rectangle.
y
Y-Coordinate of the center point of the rectangle.
z
Z-Coordinate of the center point of the rectangle.
dWidth
Width of the rectangle.
dHeight
Height of the rectangle.
dAngle
Rotation angle of the rectangle.
dDepth
Depth of the box feature.
pPlane
Reference plane object on which the rectangle will be constructed.
ExtentSide
ValueDescription
igAddRound
igAll
igAlongAnAxis
igAngularDummy
igAsConstruction
igBend
igBendAndFaceCornerRelief
igBendOnlyCornerRelief
igBothFeature 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
igExtendFeature 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
igInsideFeature Properties - Remove/Add Material Inside
igInsideDimension
igIntersect
igLancedEnd
igLeftFeature Properties - Project to Left
igLinear
igLinearCurvatureContinuousExtension
igLinearTangentExtension
igLip
igLouverFormedEndType
igLouverLancedEndType
igLouverRound
igLouverRoundNone
igMitreByAngle
igMitreByDist
igMitreManufacturingCut
igMitreNormalToThickness
igMitreParallelToThickness
igMitreRegularCut
igMove
igMultipleEdges
igNatural
igNeutralFactorFromExcel
igNFType
igNoCornerRound
igNoExtendFeature Properties - Do Not Extend
igNone
igNonSymmetric
igNormal
igNormalSideDummyFeature Properties - Normal Side
igNoRound
igNullConstant
igOffset
igOutsideFeature 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
igReverseNormalSideDummyFeature Properties - Reverse Normal Side
igRightFeature 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
igSymmetricFeature Properties - Symmetric Extent
igTangent
igTangentInterior
igTaperByAngle
igTaperByRatio
igTaperByRLRatio
igTaperDimAtBottom
igTaperDimAtTop
igTaperedEnd
igTaperedHole
igTaperedPipeThread
igTaperedToPlane
igTappedHole
igThickness
igThkInProfilePlane
igThkNormalToProfilePlane
igThreeHundredAndSixty
igThroughAll
igThroughAxis
igToEndOfEdge
igToggleToConstructionToggle from Design to Construction
igToggleToDesignToggle 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
Specifies the direction in which material needs to be added.
vbKeyPointExtent
Specifies whether to use key point of an object or not.
pKeyPointObj
Key point object for the extent (will be used only if vbKeyPointExtent is VARIANT_TRUE)
pKeyPointFlags
ValueDescription
igInteriorReverseTangentNormalKey-point Extent - Interior Reverse Tangent Normal
igInteriorTangentNormalKey-point Extent - Interior Tangent Normal
igReverseTangentNormalKey-point Extent - Reverse Tangent Normal
igTangentNormalKey-point Extent - Tangent Normal
Helps find tangent key point on cylinders, spheres and cones. This will be used only when vbKeyPointExtent  is VARIANT_TRUE and pKeyPointObj  is passed in.
Example
Private Sub AddByCenter_Click(sender As Object, e As EventArgs) Handles AddByCenter.Click
    Dim objApp As SolidEdgeFramework.Application = Nothing
    Dim objDoc As SolidEdgePart.PartDocument = Nothing
    Dim objModels As SolidEdgePart.Models = Nothing
    Dim objBaseModel As SolidEdgePart.Model = Nothing
    Dim objBoxes As SolidEdgePart.BoxFeatures = Nothing
    Dim objBox As SolidEdgePart.BoxFeature = Nothing
    Try
        ' Create/get the application with specific settings
        objApp = Marshal.GetActiveObject("SolidEdge.Application")
        'Add part document
        objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        'Change Modeling mode to Synchronous
        objDoc.ModelingMode = SolidEdgePart.ModelingModeConstants.seModelingModeSynchronous
        objModels = objDoc.Models
        'Create a box as a base feature on the XZ plane away from the view
        objBaseModel = objModels.AddBoxByCenter(0.0, 0.0, 0.0, 0.01, 0.01, 0.0, 0.01, objDoc.RefPlanes.Item(3), SolidEdgePart.FeaturePropertyConstants.igLeft, False, Nothing, 0)

        'Get the boxes collection
        objBoxes = objModels.Item(1).BoxFeatures
        'Create a box by center
        objBox = objBoxes.AddByCenter(0.0, 0.0, 0.0, 0.005, 0.005, 0.0, 0.01, objDoc.RefPlanes.Item(3), SolidEdgePart.FeaturePropertyConstants.igRight, False, Nothing, 0)


    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
See Also

BoxFeatures Collection  | BoxFeatures Members