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 |
- 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.Value Description FHITDATA_BALLCENTER FHITDATA_CENTROID FHITDATA_VECTOR - MeasOrTheo
Optional Long value. If no value is supplied, the default value is FDATA_MEAS.Value Description FDATA_ALL FDATA_MEAS FDATA_TARG FDATA_THEO - CoordSystem
Optional Long that denotes the coordinate system in which to report. An empty value of "" will use the current alignment.Value Description FDATA_CAD FDATA_MACHINE FDATA_PART FDATA_PARTMM3 FDATA_POLAR - 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.Value Description PLANE_BACK PLANE_BOTTOM PLANE_FRONT PLANE_LEFT PLANE_RIGHT PLANE_TOP
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. |