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
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));