location_object.RefFrame Property

Sets and gets a pointer to the reference frame object that the location_object is defined relative to.

location_object.RefFrame= <reference_frame_object>
-or-
location_object.RefFrame

Prerequisites

The location_object must be a Cartesian Location.

Parameters

None

Remarks

Sets or gets the pointer to a reference frame object that the location_object’s position and orientation is to be defined relative to. Whenever the location_object’s total position and orientation are computed, the position and orientation of the RefFrame are automatically taken into consideration. When a new Location Object is defined, its pointer to a reference frame object is zeroed by default.

Examples

Dim ref1 As New RefFrame           ' Also allocates Loc
Dim loc1 As New Location
ref1.Loc.XYZ(100,90,-80,0,0,45) ' Define base frame
loc1.RefFrame = ref1 ' Define loc1 wrt ref1
loc1.XYZ(10,0,0,0,180,0) ' Define loc1 poswrtref
Console.Writeline(loc1.Pos.X) ' Displays 107.07
Console.Writeline(loc1.Pos.Y) ' Displays 97.07
Console.Writeline(loc1.Pos.Z) ' Displays -80

See Also

Location Class | RefFrame Class