Click or drag to resize
SoDBCreateGlobalField Method

The database maintains a namespace for global fields, making sure that there is at most one instance of a global field with any given name in the database.

Namespace: OIV.Inventor
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public static SoField CreateGlobalField(
	string name,
	Type type
)

Parameters

name
Type: SystemString
type
Type: SystemType

Return Value

Type: SoField
Remarks

This routine is used to create new global fields. If there is no global field with the given name, it will create a new global field with the given name and type. If there is already a global field with the given name and type, it will return it. If there is already a global field with the given name but a different type, this returns NULL.

All global fields must be derived from OIV.Inventor.Fields.SoField; typically the result of this routine is cast into the appropriate type. For example:

SoSFInt32 intField = (SoSFInt32)SoDB.CreateGlobalField("Frame", typeof(SoSFInt32));

See Also