Show / Hide Table of Contents

Class APISchema

Use this class to interact with the AntFarm APISchema.

The APISchema class does not provide public constructors. Please refer to:

  • NewSchema(Guid, String, Guid, APIColour, Boolean, String, APIColour),
in class AntFarmAPI.

// settings as APIDataSetSettings (see APIDataSetSettings)
APISchema schema = AntFarmAPI.NewSchema(yourClientId, "yourDataSetName", yourDataSetId, yourDataSetColour, createLayer, layerName, layerColour);

Used for writing data and Rhino Objects into the AntFarm Database when you know nothing about the current state of the database Should Only be used for Plug-ins that read data from file formats, generate rhino geometry and then want to link the Geometry to the data from the read in file.

Inheritance
System.Object
APISchema
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: AntFarm.API
Assembly: AntFarm.dll
Syntax
public class APISchema

Methods

AddObject(Guid, List<Object>)

Adds RhinoObject id with associated values to schema

Declaration
public void AddObject(Guid rhId, List<object> values)
Parameters
Type Name Description
System.Guid rhId

RhinoObject Id

System.Collections.Generic.List<System.Object> values

Values assigned to this RhinoObject

Exceptions
Type Condition
APIException

Commit(Boolean)

Commits APISchema to AntFarm

Declaration
public void Commit(bool invokeHistory)
Parameters
Type Name Description
System.Boolean invokeHistory
Exceptions
Type Condition
APIException

GetRhinoIds()

Get Rhino object ids in this schema

Declaration
public List<Guid> GetRhinoIds()
Returns
Type Description
System.Collections.Generic.List<System.Guid>

Rhino object ids

Exceptions
Type Condition
APIException

SetAttributes(Dictionary<String, Type>)

Sets attributes and cleans the attribute names

Declaration
public void SetAttributes(Dictionary<string, Type> attributes)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<System.String, System.Type> attributes

Dictionary providing Attribute names and type as System.Type

Exceptions
Type Condition
APIException

SetAttributes(List<APIAttribute>)

Sets attributes for the Schema

Declaration
public void SetAttributes(List<APIAttribute> attributes)
Parameters
Type Name Description
System.Collections.Generic.List<APIAttribute> attributes

List of APIAttribute(s)

Exceptions
Type Condition
APIException
In This Article
Back to top Generated by DocFX