VS:GetNumGradientSegments

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Gets the number of segments in the gradient.
FUNCTION GetNumGradientSegments(
gradient  :HANDLE) : INTEGER;
def vs.GetNumGradientSegments(gradient):
    return INTEGER

Parameters

gradient HANDLE The gradient from which to get the number of segments.

Return Value

Returns the number of segments in the gradient if successful; 0 otherwise.

Remarks

Note: a gradient must always have at least 2 segments.

This also returns the number of levels in a hatch definition, like [{VS:GetObjectVariableInt]](HatchDefH, 660).

Example

VectorScript

numSegments := GetNumGradientSegments(gradientHandle);

Python

numSegments = vs.GetNumGradientSegments(gradientHandle)

Version

Availability: from VectorWorks10.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox