123456789_123456789_123456789_123456789_123456789_

Class: Sketchup::ClassificationSchema

Relationships
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
self, Comparable
Inherits: Object

Overview

The ClassificationSchema class represent schemas loaded in the model.

Version:

  • SketchUp 2015

Instance Method Summary

Instance Method Details

#<=>(schema2) ⇒ Object

The <=> method is used to compare two ClassificationSchema objects for sorting. The comparison is done based on the schema name.

Examples:

schema1 = Sketchup.active_model.classifications["IFC 2x3"]
schema2 = Sketchup.active_model.classifications["gbXML"]
# Returns -1
result = schema1 <=> schema2
# Returns an array of sorted schemas.
schemas = Sketchup.active_model.classifications.to_a.sort

Parameters:

  • schema2

    The second schema in the comparison.

Returns:

  • Integer - -1 if schema1 is less then schema2. 1 if schema1 is greater than schema2, 0 if the schemas are equal.

Version:

  • SketchUp 2015

#nameObject

The name method returns the name of the schema.

Examples:

Sketchup.active_model.classifications.each { |schema|
  puts schema.name
}

Returns:

  • ::String - containing the schema name.

Version:

  • SketchUp 2015

#namespaceObject

The namespace method returns the namespace of the schema.

Examples:

Sketchup.active_model.classifications.each { |schema|
  puts schema.namespace
}

Returns:

  • ::String - containing the schema namespace.

Version:

  • SketchUp 2015