Click or drag to resize

GH_DocumentAddObject Method

Add a new object to the document. If the object is already contained, nothing will happen

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public bool AddObject(
	IGH_DocumentObject docObject,
	bool update,
	int index = 2147483647
)

Parameters

docObject
Type: Grasshopper.KernelIGH_DocumentObject
The object to add.
update
Type: SystemBoolean
If True, a new solution will be triggered afterwards, regardless of event response settings.
index (Optional)
Type: SystemInt32
Index at which object will be inserted.

Return Value

Type: Boolean
See Also