Description
Add one or more edges to selected profiles
-
Return Type
-
A Long value.
The total number of edges added to all profiles.
-
Syntax
-
object.AddEdges (Distances, [Selector], [Attributes])
The AddEdges Method syntax has these parts: |
| object | An expression evaluating to an object of type McProfileEdges. | | Distances | Required. A Variant value. 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 the same Selector argument, the EdgeDistances property is exposed in the proper format to be used as this argument. For each distance, an edge is added 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 an existing edge exists at a given distance, it will NOT be replaced (and the returned count will reflect this). To ensure that an edge was replaced you would need to call RemoveEdges first.
| | Selector | Optional. 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 added for just the indicated profile. In this case, the Distances and
| | Attributes | Optional. A Variant value. If given it must be either a single value (which is used for all added edges), or it must be shaped shaped to parallel the Distance argument. For the same Selector argument, the EdgeDistances property is exposed in the proper format to be used as this argument.
If not given, then mcpeeaAddedEdgeFlag is assumed for each added edge. The mcpeeaEdgeQualityMask bits are filled with a measure of edge.
| Remarks
This method adds one or more edges to selected profiles. Normally, one edge will be added at a time to one profile, but occasionally you may want to add many edges to one profile or many edges to many profiles. A special case where edges are added to all profiles can be used to restore edges to some captured state (see Example).
If any edges are added 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.
|