Description

A read-only property giving the length of the last sample section for each line profile.

Property type

A Variant value.  

Syntax

object.LengthPerSample([Selector])

The LengthPerSample Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McLineProfiles.
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 value, then the sample lengths for the indicated profile is exposed as a scalar Double value.

If the Selector argument is Empty, Error or Null, or any negative scalar value, then the sample lengths for all CountOfProfiles profiles available in the last access to ProfileValues, exposed as an array of Double values, one for each profile. The number of elements in the array will be equal to the CountOfProfiles property.

If Selector is an array, then zero or positive values are treated as indices into the features collection, negative values are legal but ignored. In this case, the sample lengths for the indicated features will be exposed as an array of Double values equal to the length of the number of non-negative elements in the Selector array. Index values greater or equal to the CountOfProfiles property are illegal.

Remarks

This property is exposed in calibrated units if the CalibratedLength property is True and the ancestor McLines or McRegions' McFeatures.SpatialCalibration property is set or the ancestor McImage.SpatialCalibration property is set.

Depending on the SampleMode property, each ancestor line feature may be broken into an equal number of samples (mclpsmFixedNumberOfSamples) in which case each sample, including the last one on each line, will be the same length for a given ancestor line feature.

Or with a SampleMode of mclpsmFixedLenghtPerSample the line feature will be broken into samples of a given length (given by the SampleNumbersOrLengths property). In this latter case, all samples from each ancestor line feature will be the same (SampleNumbersOrLengths), except possibly the last sample on each line feature. This property gives access to those lengths, one “Double” value for each for each CountOfProfiles profile available in the last access to ProfileValues. (See Example)

When accessing the LengthPerSample property, the Selector argument determines whether all line feature sample lengths are returned as an array (this is the default case), or if a single length is to be returned or a sub-selection of all profile sample lengths is exposed as an array.

If IsStale goes True, this property is recomputed when accessed.