Collapse All Expand All

PC-DMIS 2019 R1 Object Library |
GetSampleHit Method
See Also Send Topic Feedback | See Object Hierarchy Chart

index
  The index number of the desired hit object to retrieve.

DataType
  Optional Long value. If no value is supplied, the default value is FHITDATA_CENTROID.

MeasOrTheo
  Optional Long value. If no value is supplied, the default value is FDATA_MEAS.

CoordSystem
  Optional Long that denotes the coordinate system in which to report. An empty value of "" will use the current alignment.

Alignment
  Optional String that denotes what alignment to use. You can pass the empty string to denote the current alignment.

  If no value is supplied, the default value is an empty string which causes the current alignment to be used.

Workplane
  Optional parameter with the ENUM_PLANE_TYPE enumeration for the PARTMM3 and POLAR coordinate system to denote the workplane to be used.

PCDLRN ActiveX DLL > FeatCmd Object : GetSampleHit Method

Glossary Item Box

# Description

Returns a PointData object with the values of the sample hit.

# Syntax

Visual Basic
    Public Function GetSampleHit( _
       ByVal index As Long, _
       ByVal DataType As FHITDATA_TYPES, _
       ByVal MeasOrTheo As FDATA_DATASET, _
       ByVal CoordSystem As FDATA_COORDSYS, _
       ByVal Alignment As String, _
       ByVal Workplane As ENUM_PLANE_TYPE _
    ) As PointData

# Parameters

index
  The index number of the desired hit object to retrieve.
DataType

  Value | Description
  --- | ---
  FHITDATA_BALLCENTER |
  FHITDATA_CENTROID |
  FHITDATA_VECTOR |

  Optional Long value. If no value is supplied, the default value is FHITDATA_CENTROID.
MeasOrTheo

  Value | Description
  --- | ---
  FDATA_ALL |
  FDATA_MEAS |
  FDATA_TARG |
  FDATA_THEO |

  Optional Long value. If no value is supplied, the default value is FDATA_MEAS.
CoordSystem

  Value | Description
  --- | ---
  FDATA_CAD |
  FDATA_MACHINE |
  FDATA_PART |
  FDATA_PARTMM3 |
  FDATA_POLAR |

  Optional Long that denotes the coordinate system in which to report. An empty value of "" will use the current alignment.
Alignment
  Optional String that denotes what alignment to use. You can pass the empty string to denote the current alignment.

  If no value is supplied, the default value is an empty string which causes the current alignment to be used.

Workplane

  Value | Description
  --- | ---
  PLANE_BACK |
  PLANE_BOTTOM |
  PLANE_FRONT |
  PLANE_LEFT |
  PLANE_RIGHT |
  PLANE_TOP |

  Optional parameter with the ENUM_PLANE_TYPE enumeration for the PARTMM3 and POLAR coordinate system to denote the workplane to be used.

# Return Type

PointData object.

# Remarks

Use this function to obtain sample hit information from Auto Feature commands.

| Sample Hits Automation Notes: In addition to the FeatCmd.GetSampleHit object, you can also use Command.GetText or Command.GetFieldValue to get a sample hit's position. To set a sample hit's position, use the Command.PutText method or use the methods for a PointData object (if you used FeatCmd.GetSampleHit).

To count the number of sample hits for a feature, use Command.GetDataTypeCount.

To get or set a value for a specific sample hit, you will need to use a type index. The value should be between 1 and the value returned by Command.GetDataTypeCount.

If you modify a sample hit, the FeatCmd.HasUserDefinedHits property is set to True.

# See Also

FeatCmd Object | FeatCmd Members

Copyright © 2019. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.