Click or drag to resize
SoBaseKitGetPart Method

Searches the nodekit catalog (and those of all nested nodekits) for the part named partName.

Namespace: OIV.Inventor.Nodekits
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public virtual SoNode GetPart(
	string partName,
	bool makeIfNeeded
)

Parameters

partName
Type: SystemString
makeIfNeeded
Type: SystemBoolean

Return Value

Type: SoNode
Remarks

Returns the part if a match is found , the part is public , and the part has already been built . If no match is found, or if the part is private , NULL is returned. If partName is in the catalog (or that of one of its nested nodekit parts), but the part has not been built yet, the argument makeIfNeeded determines the course of action. When makeIfNeeded is false, NULL is returned; when makeIfNeeded is true, OIV.Inventor.Nodekits.SoBaseKit.GetPart(System.String, System.Boolean) will create the part (as well as any necessary intermediary parts), put it in the correct place, and return the newly created part.

Elements of list parts and parts within nested nodekits can all be retrieved with OIV.Inventor.Nodekits.SoBaseKit.GetPart(System.String, System.Boolean) The full syntax for legal partName arguments is given below.

Part name BNF notation :

partName = singleName | compoundName

compoundName = singleName | compoundName.singleName

singleName = singlePartName | singleListElementName

singlePartName = the name of any single part in the catalog (including those that are lists or nodekits), or in the recursively nested catalogs of any of its parts.

singleListElementName = singleListName[index]

singleListName = the name of any single list-type part in the catalog, or in the recursively nested catalogs of any of its parts.

index = integer

Examples of valid part names are:

"transform", "appearance.material", "childList[2].drawStyle", "foot", "bird.leftLeg.foot", "octopus.leg[4].suctionCup[2].material"

See Also