IGH_DataAccess

References
public interface IGH_DataAccess
Provides access to component parameters, in order to retrieve and assign data during solutions.

Properties

Iteration

#
Gets the current iteration count. The first time the SolveInstance() function is called on a component during a solution the Iteration counter will be zero. It will be incremented by one for every subsequent call.
int Iteration { get; }
An integer representing the iteration count.

Methods

AbortComponentSolution

#
Call this method if you wish to stop solving this component.
void AbortComponentSolution()

BlitData<Q>

#
Creates a direct copy of an existing data structure. The existing generic instance must of the exact same type as the target parameter.
bool BlitData<Q>(
paramIndex,
Index of output parameter.
tree,
Parameter whose data to blit
overwrite
If true, any existing data will be removed.
)

DisableGapLogic

#
Call this function if you want to disable the gap null logic for the current iteration.
void DisableGapLogic()

DisableGapLogic

#
Call this function if you want to disable the gap null logic for a specific output parameter.
void DisableGapLogic(
paramIndex
Index of output parameter to disable.
)

GetData<T>

#
Retrieve data from an input parameter during GH_Component.SolveInstance().
bool GetData<T>(
index,
ref T
destination
)
True on success, false on failure.

GetData<T>

#
Retrieve data from an input parameter during GH_Component.SolveInstance().
bool GetData<T>(
name,
ref T
destination
)
Remarks: Parameter access by index is faster, consider using the other overload if possible.
True on success, false on failure.

GetDataList<T>

#
Retrieve an entire list of data from an input parameter during GH_Component.SolveInstance().
bool GetDataList<T>(
index,
List<T>
list
)
True on success, false on failure.

GetDataList<T>

#
Retrieve an entire list of data from an input parameter during GH_Component.SolveInstance().
bool GetDataList<T>(
name,
List<T>
list
)
Remarks: Parameter access by index is faster, consider using the other overload if possible.
True on success, false on failure.

GetDataTree<T>

#
Retrieve an entire data tree from an input parameter during GH_Component.SolveInstance().
bool GetDataTree<T>(
index,
ref GH_Structure<T>
tree
)
True on success, false on failure.

GetDataTree<T>

#
Retrieve an entire data tree from an input parameter during GH_Component.SolveInstance().
bool GetDataTree<T>(
name,
ref GH_Structure<T>
tree
)
Remarks: Parameter access by index is faster, consider using the other overload if possible.
True on success, false on failure.

IncrementIteration

#
Increments the iteration count by 1.
void IncrementIteration()

ParameterTargetIndex

#
Get the target index for the specified output parameter.
int ParameterTargetIndex(
paramIndex
Index of output parameter.
)

ParameterTargetPath

#
Get the target path for the specified output parameter.
GH_Path ParameterTargetPath(
paramIndex
Index of output parameter.
)

SetData

#
Expert user function. Stores data in an output parameter during GH_Component.SolveInstance(). Use this function only for setting individual data items. If you want to set lists of data, you *must* call SetDataList() instead.
bool SetData(
paramIndex,
Index of the output parameter at which to store the data.
data,
Data to store. Data will be converted if necessary, but it will not be duplicated automatically.
itemIndexOverride
Typically the item index is a result of Data matching logic. If you want to override the item index, then call this function.
)

SetData

#
Stores data in an output parameter during GH_Component.SolveInstance(). Use this function only for setting individual data items. If you want to set lists of data, you *must* call SetDataList() instead.
bool SetData(
paramIndex,
Index of the output parameter at which to store the data.
data
Data to store. Data will be converted if necessary, but it will not be duplicated automatically.
)

SetData

#
Stores data in an output parameter during GH_Component.SolveInstance().
bool SetData(
paramName,
Name of the output parameter at which to store the data.
data
Data to store. Data will be converted if necessary, but it will not be duplicated automatically.
)
Remarks: Parameter access by index is faster, consider using the other overload if possible.

SetDataList

#
Expert user function. Stores a list of data in an output parameter during GH_Component.SolveInstance().
bool SetDataList(
paramIndex,
Index of the output parameter at which to store the list.
data,
Data to store. Data will be converted if necessary, but it will not be duplicated automatically.
listIndexOverride
Typically the branch index is a result of Data matching logic. If you want to override the branch index, then call this function.
)

SetDataList

#
Stores a list of data in an output parameter during GH_Component.SolveInstance().
bool SetDataList(
paramIndex,
Index of the output parameter at which to store the list.
data
Data to store. Data will be converted if necessary, but it will not be duplicated automatically.
)

SetDataList

#
Stores data in an output parameter during GH_Component.SolveInstance().
bool SetDataList(
paramName,
Name of the parameter at which to store the data.
data
Data to store. Data will be converted if necessary, but it will not be duplicated automatically.
)
Remarks: Parameter access by index is faster, consider using the other overload if possible.

SetDataTree

#
Folds a utility tree representation into this tree.
bool SetDataTree(
paramIndex,
Index of output parameter to merge with.
tree
Tree to merge
)

SetDataTree

#
Folds a utility tree representation into this tree.
bool SetDataTree(
paramIndex,
Index of output parameter to merge with.
tree
Tree to merge
)

Util_CountNonNullRefs<T>

#
Count all object references in L
int Util_CountNonNullRefs<T>(
List<T>
L
List to parse
)
Number of proper objects in L

Util_CountNullRefs<T>

#
Count all null references in L
int Util_CountNullRefs<T>(
List<T>
L
List to parse
)
Number of nulls in L

Util_EnsureNonNullCount<T>

#
Tests a list to see if it contains sufficient non-null references.
bool Util_EnsureNonNullCount<T>(
List<T>
L,
List to parse
N
)
True if L contains N or more non-null references.

Util_FirstNonNullItem<T>

#
Returns the index of the first non-null item in a list.
int Util_FirstNonNullItem<T>(
List<T>
L
List to parse.
)
The index of the first non-null item or -1 if no object reference could be found.

Util_RemoveNullRefs<T>

#
Remove all null references from a list of items.
List<T> Util_RemoveNullRefs<T>(
List<T>
L
List to filter
)
List containing only non-null items. References are shared with L