Description Retrieves the data from a specified Segmented Curve in the associated FRED document.
Syntax GetSegmentedCurve n, ent, points
Parameters n As Long Node number of the Segmented curve.
ent As T_ENTITY The generic entity data for the Segmented curve.
points() As Double Array containing at least 2 sets of X, Y, Z values for points in the Segmented Curve.
Example The array points() is returned as a 2D array if the array dimensions have not been previously declared. The form of the 2D array will be points(c,r) where c refers to the column (0 = x, 1 = y, 2 = z) and r refers to the row (0 = point 1, 1 = point 2, .... N = point N+1), consistent with the segmented curve dialog. If the array dimensions have been declared before usage, the command accepts either a 1D or 2D array.
The following script retrieves a segmented curve's information, redefines the points and sets the new values back to the document.
Dim ent As T_ENTITY Dim points() As Double Dim cNode As Long
'get the node number of the curve of interest cNode = FindFullName( "Geometry.Custom Element.Catadioptric Curve" )
'get the current curve values GetSegmentedCurve cNode, ent, points()
'redefine the points in the curve ReDim points(2,4) points(0,0) = 2 : points(1,0) = 2 : points(2,0) = 0 points(0,1) = -2 : points(1,1) = 2 : points(2,1) = 0 points(0,2) = -2 : points(1,2) = -2 : points(2,2) = 0 points(0,3) = 2 : points(1,3) = -2 : points(2,3) = 0 points(0,4) = 2 : points(1,4) = 2 : points(2,4) = 0
'set the new values back to the curve node SetSegmentedCurve cNode, ent, points()
Update
See Also Examples
|