Click or drag to resize

IMcRefFeaturesDuplicate Method

Returns a duplicate of the McRefFeatures instance.

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Function Duplicate As McRefFeatures

Return Value

Type: McRefFeatures
Unnamed, newly created McRefFeature duplicate
Remarks
This method creates a new McRefFeatures interface, which will have the same parent McFeatures (an McRegions, McLines or McPoints) that this one has. The newly created McRefFeatures will have the same ReferenceFeature property as this one, but you will often want to change this (see examples).
Examples
VB
'Example 1. Make region centroid distance measurements to both lines and points
Dim myRegionToPointRef As McRefFeatures
Set myRegionToPointRef = ThisApplication.ActiveImage.RegionFeatures.Reference.Duplicate
Set myRegionToPointRef.ReferenceFeature = ThisApplication.ActiveImage.PointFeatures
Dim myRegionToLineRef As McRefFeatures
Set myRegionToLineRef = ThisApplication.ActiveImage.RegionFeatures.Reference.Duplicate
Set myRegionToLineRef.ReferenceFeature = ThisApplication.ActiveImage.LineFeatures
Debug.Print "Distance from Centroids to ref point = " & _
McToText( myRegionToPointRef.mRefDistance) & vbCrlf & _
"Distance from Centroids to ref line = " & _
McToText( myRegionToLineRef.mRefDistance)
'Example 2. Use CreateOperator to create a named McRefFeatures operator
' and use it to get distance from the Aoi's to a ref point
CreateOperator "McRefFeatures", ThisApplication.ActiveImage.Aoi, "RefPoint"
Set ThisApplication.ActiveImage.Aoi.RefPoint.ReferenceFeature = ThisApplication.ActiveImage.PointFeatures
Debug.Print "Distance from Aoi centroids to ref point = " & _
McToText( ThisApplication.ActiveImage.Aoi.RefPoint.mRefDistance)
See Also