GH_Format

public sealed class GH_Format
Provides standard Grasshopper formatting functions.

Methods

DefaultCulture

#
public static IFormatProvider DefaultCulture()

FormatAngularDimension

#
public static string FormatAngularDimension()

FormatAnnotationValidity

#
If the annotation is invalid, return a string describing why.
public static string FormatAnnotationValidity(
val,
Value to format.
identifier = "Annotation"
Name used to refer to the value in the format.
)
A string describing why the annotation is invalid or String.Empty if the value is not invalid.

FormatArc

#
public static string FormatArc(
data
)

FormatArc

#
public static string FormatArc(
data
)

FormatArcValidity

#
If the arc is invalid, return a string describing why.
public static string FormatArcValidity(
val,
Value to format.
identifier = "Arc"
Name used to refer to the value in the format.
)
A string describing why the arc is invalid or String.Empty if the value is not invalid.

FormatBoolean

#
public static string FormatBoolean(
data
)

FormatBoolean

#
public static string FormatBoolean()

FormatBoundingBoxValidity

#
If the box is invalid, return a string describing why.
public static string FormatBoundingBoxValidity(
val,
Value to format.
identifier = "Bounding Box"
Name used to refer to the value in the format.
)
A string describing why the box is invalid or String.Empty if the value is not invalid.

FormatBox

#
public static string FormatBox(
data
)

FormatBox

#
public static string FormatBox(
data
)

FormatBoxValidity

#
If the box is invalid, return a string describing why.
public static string FormatBoxValidity(
val,
Value to format.
identifier = "Box"
Name used to refer to the value in the format.
)
A string describing why the box is invalid or String.Empty if the value is not invalid.

FormatBrep

#
public static string FormatBrep(
data
)

FormatBrep

#
public static string FormatBrep(
data
)

FormatBrepValidity

#
If the brep is invalid, return a string describing why.
public static string FormatBrepValidity(
val,
Value to format.
identifier = "Brep"
Name used to refer to the value in the format.
)
A string describing why the brep is invalid or String.Empty if the value is not invalid.

FormatCentermark

#
public static string FormatCentermark()

FormatCircle

#
public static string FormatCircle(
data
)

FormatCircle

#
public static string FormatCircle()

FormatCircleValidity

#
If the circle is invalid, return a string describing why.
public static string FormatCircleValidity(
val,
Value to format.
identifier = "Circle"
Name used to refer to the value in the format.
)
A string describing why the circle is invalid or String.Empty if the value is not invalid.

FormatClippingPlane

#
public static string FormatClippingPlane()

FormatClippingPlaneValidity

#
If the clipping plane is invalid, return a string describing why.
public static string FormatClippingPlaneValidity(
val,
Value to format.
identifier = "Clipping Plane"
Name used to refer to the value in the format.
)
A string describing why the clipping plane is invalid or String.Empty if the value is not invalid.

FormatColour

#
public static string FormatColour(
Color
data
)

FormatColour

#
public static string FormatColour()

FormatComplexNumber

#
public static string FormatComplexNumber()

FormatComplexNumber

#
public static string FormatComplexNumber()

FormatComplexValidity

#
If the complex number is invalid, return a string describing why.
public static string FormatComplexValidity(
val,
Value to format.
identifier = "Complex"
Name used to refer to the value in the format.
)
A string describing why the complex number is invalid or String.Empty if the value is not invalid.

FormatCurve

#
public static string FormatCurve(
data,
prefix = "",
name = "Curve"
)

FormatCurve

#
public static string FormatCurve()

FormatCurveValidity

#
If the curve is invalid, return a string describing why.
public static string FormatCurveValidity(
val,
Value to format.
identifier = "Curve"
Name used to refer to the value in the format.
)
A string describing why the curve is invalid or String.Empty if the value is not invalid.

FormatDate

#
public static string FormatDate()

FormatDate

#
public static string FormatDate(
data
)

FormatDetailView

#
public static string FormatDetailView()

FormatDetailViewValidity

#
If the detail view is invalid, return a string describing why.
public static string FormatDetailViewValidity(
val,
Value to format.
identifier = "Detail View"
Name used to refer to the value in the format.
)
A string describing why the detail view is invalid or String.Empty if the value is not invalid.

FormatDimension

#
public static string FormatDimension()

FormatDouble

#
public static string FormatDouble(
data
)

FormatDouble

#
public static string FormatDouble()

FormatDoubleValidity

#
If the number is invalid, return a string describing why.
public static string FormatDoubleValidity(
val,
Value to format.
identifier = "Number"
Name used to refer to the value in the format.
)
A string describing why the number is invalid or String.Empty if the value is not invalid.

FormatExtrusion

#
public static string FormatExtrusion()

FormatExtrusion

#
public static string FormatExtrusion()

FormatExtrusionValidity

#
If the extrusion is invalid, return a string describing why.
public static string FormatExtrusionValidity(
val,
Value to format.
identifier = "Extrusion"
Name used to refer to the value in the format.
)
A string describing why the extrusion is invalid or String.Empty if the value is not invalid.

FormatFilePath

#
Format a filepath so that it doesn't exceed a string length. If the filepath filename is already longer than maxLength it will be returned intact.
public static string FormatFilePath(
path,
Path for format.
maxLength
Maximum number of characters to use.
)
The formatted path.

FormatFilePath

#
Format a filepath so that it doesn't exceed width. If the filepath filename is already longer than maxLength it will be returned intact.
public static string FormatFilePath(
path,
Path to format.
maxWidth,
Maximum allowed width (in pixels)
Font
font
Font to use for measuring.
)
The formatted path.

FormatGeometry

#
public static string FormatGeometry()

FormatHatch

#
public static string FormatHatch()

FormatHatchValidity

#
If the hatch is invalid, return a string describing why.
public static string FormatHatchValidity(
val,
Value to format.
identifier = "Hatch"
Name used to refer to the value in the format.
)
A string describing why the hatch is invalid or String.Empty if the value is not invalid.

FormatInstanceReference

#
public static string FormatInstanceReference()

FormatInstanceReferenceValidity

#
If the instance reference is invalid, return a string describing why.
public static string FormatInstanceReferenceValidity(
val,
Value to format.
identifier = "Instance Reference"
Name used to refer to the value in the format.
)
A string describing why the instance reference is invalid or String.Empty if the value is not invalid.

FormatInteger

#
public static string FormatInteger()

FormatInteger

#
public static string FormatInteger(
data
)

FormatInterval

#
public static string FormatInterval()

FormatInterval

#
public static string FormatInterval()

FormatInterval

#
public static string FormatInterval()

FormatInterval

#
public static string FormatInterval()

FormatIntervalValidity

#
If the point is invalid, return a string describing why.
public static string FormatIntervalValidity(
val,
Value to format.
identifier = "Domain",
Name used to refer to the value in the format.
testSingleton = false,
If true, Intervals that have no length are considered invalid.
testDecreasing = false
If true, Intervals that are decreasing are considered invalid.
)
A string describing why the point is invalid or String.Empty if the value is not invalid.

FormatKeys

#
Format a keys enumeration as though it's a menu shortcut
public static string FormatKeys(
keys
Key data to format
)

FormatLeader

#
public static string FormatLeader()

FormatLightValidity

#
If the light is invalid, return a string describing why.
public static string FormatLightValidity(
val,
Value to format.
identifier = "Light"
Name used to refer to the value in the format.
)
A string describing why the light is invalid or String.Empty if the value is not invalid.

FormatLine

#
public static string FormatLine(
data
)

FormatLine

#
public static string FormatLine(
data
)

FormatLinearDimension

#
public static string FormatLinearDimension()

FormatLineValidity

#
If the line is invalid, return a string describing why.
public static string FormatLineValidity(
val,
Value to format.
identifier = "Line"
Name used to refer to the value in the format.
)
A string describing why the line is invalid or String.Empty if the value is not invalid.

FormatMatrix

#
public static string FormatMatrix()

FormatMatrix

#
public static string FormatMatrix(
Matrix
data
)

FormatMesh

#
public static string FormatMesh(
data
)

FormatMesh

#
public static string FormatMesh(
data,
sPrefix = ""
)

FormatMeshFace

#
public static string FormatMeshFace()

FormatMeshFaceValidity

#
If the number is invalid, return a string describing why.
public static string FormatMeshFaceValidity(
val,
Value to format.
identifier = "MeshFace"
Name used to refer to the value in the format.
)
A string describing why the point is invalid or String.Empty if the value is not invalid.

FormatMeshValidity

#
If the mesh is invalid, return a string describing why.
public static string FormatMeshValidity(
val,
Value to format.
identifier = "Mesh"
Name used to refer to the value in the format.
)
A string describing why the mesh is invalid or String.Empty if the value is not invalid.

FormatOrdinateDimension

#
public static string FormatOrdinateDimension()

FormatPlane

#
public static string FormatPlane()

FormatPlane

#
public static string FormatPlane(
data
)

FormatPlaneValidity

#
If the plane is invalid, return a string describing why.
public static string FormatPlaneValidity(
val,
Value to format.
identifier = "Plane",
Name used to refer to the value in the format.
testUnitAxes = false
If True, planes with non-unit axis vectors are considered to be invalid.
)
A string describing why the plane is invalid or String.Empty if the value is not invalid.

FormatPoint

#
public static string FormatPoint()

FormatPoint

#
public static string FormatPoint(
data
)

FormatPointCloud

#
public static string FormatPointCloud()

FormatPointCloud

#
public static string FormatPointCloud(
data,
prefix = ""
)

FormatPointCloud

#
public static string FormatPointCloud()

FormatPointCloudValidity

#
If the pointcloud is invalid, return a string describing why.
public static string FormatPointCloudValidity(
val,
Value to format.
identifier = "Point Cloud"
Name used to refer to the value in the format.
)
A string describing why the pointcloud is invalid or String.Empty if the value is not invalid.

FormatPointValidity

#
If the point is invalid, return a string describing why.
public static string FormatPointValidity(
val,
Value to format.
identifier = "Point"
Name used to refer to the value in the format.
)
A string describing why the point is invalid or String.Empty if the value is not invalid.

FormatRadialDimension

#
public static string FormatRadialDimension()

FormatRectangleValidity

#
If the rectangle is invalid, return a string describing why.
public static string FormatRectangleValidity(
val,
Value to format.
identifier = "Rectangle"
Name used to refer to the value in the format.
)
A string describing why the rectangle is invalid or String.Empty if the value is not invalid.

FormatSingle

#
public static string FormatSingle(
data
)

FormatString

#
Replaces the format items in a string with the string representations of corresponding objects in a specified array.
public static string FormatString(
text,
A composite format string.
params object[]
args
An object array that contains zero or more objects to format.
)
Remarks: Formatting is done using invariant-culture formatting information.
A copy of format in which the format items have been replaced by the string representation of the corresponding objects in args.

FormatSubD

#
public static string FormatSubD(
data
)

FormatSubD

#
public static string FormatSubD(
data
)

FormatSubDValidity

#
If the brep is invalid, return a string describing why.
public static string FormatSubDValidity(
val,
Value to format.
identifier = "SubD"
Name used to refer to the value in the format.
)
A string describing why the brep is invalid or String.Empty if the value is not invalid.

FormatSurface

#
public static string FormatSurface(
data
)

FormatSurface

#
public static string FormatSurface()

FormatSurfaceValidity

#
If the surface is invalid, return a string describing why.
public static string FormatSurfaceValidity(
val,
Value to format.
identifier = "Surface"
Name used to refer to the value in the format.
)
A string describing why the surface is invalid or String.Empty if the value is not invalid.

FormatTextDot

#
public static string FormatTextDot()

FormatTextDotValidity

#
If the text dot is invalid, return a string describing why.
public static string FormatTextDotValidity(
val,
Value to format.
identifier = "Text Dot"
Name used to refer to the value in the format.
)
A string describing why the text dot is invalid or String.Empty if the value is not invalid.

FormatTextEntity

#
public static string FormatTextEntity()

FormatTextEntity

#
public static string FormatTextEntity(
data,
prefix = ""
)

FormatTextEntity

#
public static string FormatTextEntity()

FormatTransformValidity

#
If the transform is invalid, return a string describing why.
public static string FormatTransformValidity(
val,
Value to format.
identifier = "Transform"
Name used to refer to the value in the format.
)
A string describing why the transform is invalid or String.Empty if the value is not invalid.

FormatVector

#
public static string FormatVector()

FormatVector

#
public static string FormatVector()

FormatVectorValidity

#
If the point is invalid, return a string describing why.
public static string FormatVectorValidity(
val,
Value to format.
identifier = "Vector",
Name used to refer to the value in the format.
testZero = false,
If True, zero-length vectors are considered to be invalid.
testUnit = false
If True, non-unit-length vectors are considered to be invalid.
)
A string describing why the point is invalid or String.Empty if the value is not invalid.

RhinoUnitName

#
public static string RhinoUnitName()

RhinoUnitName

#
public static string RhinoUnitName(
unitSystem
)

RhinoUnitSymbol

#
public static string RhinoUnitSymbol()

RhinoUnitSymbol

#
public static string RhinoUnitSymbol(
unitSystem
)

TreatAsCollection

#
This method is used in Scripting components to determine whether a certain class was 'intended' as a collection or as a single piece of data .
public static bool TreatAsCollection(
obj
Object to test.
)
True if we think the object was intended as a collection.

TryGetName

#
public static bool TryGetName(
Color
color,
ref string
name
)