Click or drag to resize
SoBaseKitSetPart Method

Inserts the given node (not a copy) as the new part specified by partName.

Namespace: OIV.Inventor.Nodekits
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public virtual bool SetPart(
	string partName,
	SoNode newPart
)

Parameters

partName
Type: SystemString
newPart
Type: OIV.Inventor.NodesSoNode

Return Value

Type: Boolean
Remarks

See OIV.Inventor.Nodekits.SoBaseKit.GetPart(System.String, System.Boolean) for the syntax of partName. This method adds any extra nodes needed to fit the part into the nodekit's catalog. Run-time type checking verifies that the node type of newPart matches the type called for by partName. For example, if partName was a material for an OIV.Inventor.Nodekits.SoSeparatorKit, but newPart was an OIV.Inventor.Nodes.SoTransform node, then the node would not be installed, and false would be returned.

If newPart is NULL, then the node specified by partName is removed. If this renders any private parts useless (as occurs when you remove the last child of an OIV.Inventor.Nodes.SoGroup node), they will also be removed. Hence nodekits do not retain unnecessary nodes.

true is returned on success, and false upon error.

See Also