Select Objects using Intersecting Ray Example (VBA)
This example shows how to select objects using
IModelDoc2::SelectByRay, which selects the first object that is intersected
by a ray given by a direction vector from a point within a defined radius.
Dim SelParams(7) As Double
Dim VarSelParams As Variant
Dim Status As Boolean
SelParams(0) = 0.1
SelParams(1) = 0#
SelParams(2) = 0#
SelParams(3) = -1#
SelParams(4) = 0#
SelParams(5) = 0#
SelParams(6) = 1#
VarSelParams = SelParams
Status = Part.SelectByRay((VarSelParams),
swSelFACES)