Class: ARCHline.Styles
Class: ARCHline.Styles
Inherits:
ARCHline.Styles
show all
Overview
This class holds the list of styles which an ARCHline entity of a specific type can have.
Version:
2021 development
Instance Property Summary
- [
#active ⇒ { get; }
](#active-instance_property)
The active style.
- [
#empty ⇒ { get; }
](#empty-instance_property)
Whether the stylelist is empty.
- [
#size ⇒ { get; }
](#size-instance_property)
The size of the stylelist.
- [
#type ⇒ { get; set; }
](#type-instance_property)
The type of the entity which has this stylelist.
- [
#typeId ⇒ { get; set; }
](#typeId-instance_property)
The id of the type of the entity which has this stylelist.
#active ⇒ { get; }
The active style.
When an entity of this type is created, it's style will be the active style.
Type:
Version:
- 2021 development
#empty ⇒ { get; }
Whether the stylelist is empty.
Type:
Boolean
Version:
- 2021 development
#size ⇒ { get; }
The size of the stylelist.
Type:
Integer
Version:
- 2021 development
#type ⇒ { get; set; }
The type of the entity which has this stylelist.
Type:
String
Version:
- 2021 development
#typeId ⇒ { get; set; }
The id of the type of the entity which has this stylelist.
Type:
Integer
Version:
- 2021 development
Instance Method Summary
- [
#Styles(type)
](#Styles-instance_method)
- [
#foreach(function)
](#foreach-instance_method)
- [
#get(index) ⇒ ARCHline.Style
](#get-instance_method)
Returns the style at the specified index.
- [
#toWString() ⇒ String
](#toWString-instance_method)
Returns the names of the styles.
#Styles(type)
Examples:
// Get the stylelist of the first entity in the actual selection
var selection = [ARCHline](https://help.archlinexp.com/hc/en-us/sections/360004518957-ARCHline).active_project.selection
var entity = selection.[get](https://help.hawksoft3d.com/en/360015542778-Selection#get-instance_method)(0)
var styles = new [ARCHline](https://help.archlinexp.com/hc/en-us/sections/360004518957-ARCHline).[Styles](https://help.hawksoft3d.com/en/360015454637-Styles)(entity.typeId)Parameters:
type
(Integer)
—
The id of the type of the entity which has this stylelist.
Version:
- 2021 development
#foreach(function)
Examples:
// Prints the stylelist of an [ARCHline](https://help.archlinexp.com/hc/en-us/sections/360004518957-ARCHline).[Entity](https://help.hawksoft3d.com/en/360015542618-Entity) entity, and marks the active style
var styles = new [ARCHline](https://help.archlinexp.com/hc/en-us/sections/360004518957-ARCHline).[Styles](https://help.hawksoft3d.com/en/360015454637-Styles)(entity.typeId)
var str = ''
var number = 1
styles.[foreach](https://help.hawksoft3d.com/en/360015454637-Styles#foreach-instance_method)(function(style) {
let defStr = ((style.name == styles.active.name) ? ' (active)' : '')
str += String(number) + '.\t' + style.name + defStr + '\n'
number += 1
})
[IO](https://help.archlinexp.com/hc/en-us/sections/360004524938-IO).[Print](https://help.hawksoft3d.com/en/360015454717-Print)(str)Parameters:
function
—
The function.
Version:
- 2021 development
Returns the style at the specified index.
Parameters:
index
(Integer)
Returns:
Version:
- 2021 development
#toWString() ⇒ String
Returns the names of the styles.
Returns:
(String)
Version:
2021 development