Example of Entering and Displaying 3D Vector Objects
The example demonstrates working with the three-dimensional vector object, including the display and modification
of its properties. The AboutVector3d() function requires a reference to an existing three-dimensional vector as an
OdGeVector3d instance and returns the string containing the values of X, Y, Z coordinates of the passed
vector as an OdString value. The function declares the variable of the OdString type and uses the format()
method to convert the coordinates to a string. The AboutVector3d() function has the following implementation:
The EntryVector3d() function requires a reference to an existing three-dimensional vector as an OdGeVector3d
instance which is used as a default value and returns True if the user modifies the passed instance, or False if the
user cancels entry. The function organizes a loop for entry of coordinates and displays the current values of coordinates
before the loop. If an entered value of a coordinate is incorrect, the function displays an error message and repeats
the entry. If the entered X, Y, Z coordinates are correct, the function passes the modified instance in the calling
function through own argument and returns True as a result. If the user selects [Q], the function cancels the entry,
remains the current coordinates, and returns False as a result. The EntryVector3d() function has the following
implementation: