Description

Remove one or more edges from selected profiles

Return Type

A Long value.  

The total number of edges removed from all profiles.

Syntax

object.RemoveEdges ([Distances], [Selector], [CanMissByPixels])

The RemoveEdges Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McProfileEdges.
DistancesOptional. A Variant value.

If not given (i.e., Empty, Error or Null), then all edges are removed from the selected profiles. If the Selector argument is also missing, then all edges are removed from all profiles (see Example).

If given, it can be a single scalar value, an array of values or an array of variant, each holding one or an array of values. If the Selector argument is anything other than a single index value, then the Distances must be organized as an array of Variants.

For each distance, an edge is removed if one is found at that distance from the start of the profile. If the ProfilesAncestor McLineProfiles.CalibratedLength property is True, then distances must be given in calibrated units. If the CanMissByPixels argument is given and non-zero, then the distance does not have to match exactly that of an existing edge.

SelectorOptional. A Variant value.

An empty variant, a single negative value, a single index value, or an array of zero or more index values (negative index values are legal but will be ignored).

If the Selector argument is a non-negative scalar index value, then edges are removed for just the indicated profile. In this case, if it is given, the Distances argument may be either a scalar value or an array of values. The index value must fall between zero and ProfilesAncestor.CountOfProfiles-1.

If the Selector argument is Empty, Error or Null, or any negative scalar value, then edges are removed from all ProfilesAncestor.CountOfProfiles profiles. In this case, if it is given, the Distances argument must be an array of Variant, where each Variant is a 1-D array that gives the Distances for the edges to be removed from the profile at the same index.

If Selector is an array, then zero or positive values are treated as indices into the ProfilesAncestor profiles, negative values are legal but ignored. In this case, the Distances argument must be an array of Variant, where each Variant is a 1-D array that gives the Distance for the edges to be removed from the profile at the selected index. Index values greater or equal to the ProfilesAncestor.CountOfProfiles property are illegal.

CanMissByPixelsOptional. A Double value.

is always given in image pixel units, irrespective of the state of the the ProfilesAncestor McLineProfiles.CalibratedLength property (which determines whether the Distance property is given in calibrated units or pixel units). This is because the use for this argument will almost always be to assist with edge editing by the user, where they will need to be able to click close-to but not exactly on an edge they wish to remove.

Remarks

This method removes one or more edges from selected profiles. For editing normally, one edge will be removed at a time from one profile. But the method may also be used to remove all edges from one, selected or all profiles (see Example).

If any edges are removed then an McObjMgr McObjStandardNotify.SpecialNotify is fired on the McObject backing this McProfileEdges. The notify code will be SNC_NOTIFY_HO_PROPERTYCHANGED and the notify data will be ID_IMcProfileEdges_EdgeCounts. You can use an instance of McNotifySink WithEvents in VBA to track these notifies.