Mirror Copy first protrusions in VB
Mirror Copy first protrusions in VB
(OP)
I created the first protrusion of a piece using the addFiniteExtrudedProtrusion method, and the following ones using ExtrudedProtrusion.AddFinite (from parallel Refplanes added).
I tried to make a mirror copy of the first three features, but when I include the first or base feature (the first extruded protrusion), the mirror copy fails, so I have to mirror copy the last two and finish the part adding manually in VB what would be the mirror copy of the base protrusion.
I did already check the Number of Features.
So what is going on?
I tried to make a mirror copy of the first three features, but when I include the first or base feature (the first extruded protrusion), the mirror copy fails, so I have to mirror copy the last two and finish the part adding manually in VB what would be the mirror copy of the base protrusion.
I did already check the Number of Features.
So what is going on?





RE: Mirror Copy first protrusions in VB
the 1st protrusion is created on the y/z-plane extending in the positive
X direktion. 2 more protrusions are added to the model extending from
the part also in the positive X direction. With this code I was able
to mirror the whole thing about the y/z plane. Is that the thing you
wanted to do in VB?
Dim mApp As SolidEdgeFramework.Application
Dim mPart As SolidEdgePart.PartDocument
Dim mModel As Model
'
Set mApp = GetObject(, "SolidEdge.Application")
Set mPart = mApp.ActiveDocument
Set mModel = mPart.Models.Item(1)
'
' 2 = y/z plane where 1st part is created and should be mirrored
Call mModel.MirrorParts.Add(mPart.RefPlanes.Item(2))
The method that you probably used can be used to mirror
one or more *features* about a plane from one location
on the part to another
dY
RE: Mirror Copy first protrusions in VB
the foregoing does not mean that you can't use MirrorCopy which
will be more flexible in what to mirror. The following code
snippet will do the same as the code above (3 protrusions assumed):
Dim arFeat(2) As Object ' room for 3 elements
'
Set arFeat(0) = mModel.ExtrudedProtrusions(1)
Set arFeat(1) = mModel.ExtrudedProtrusions(2)
Set arFeat(2) = mModel.ExtrudedProtrusions(3)
'
' feature copy/mirror of all three protrusions about the y/z plane
Call mModel.MirrorCopies.Add(mPart.RefPlanes.Item(2), UBound(arFeat) + 1, arFeat)
dY