Class: Layout::AutoTextDefinition

Inherits:
Object
  • Object
show all

Overview

References an auto text definition. Some auto text definitions are mandatory. Mandatory auto text definitions may not be removed, added, or modified.

A mandatory AutoTextDefinition is one of the following types:

Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_VOLUME
Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA
Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH
Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES
Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE
Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.each { |auto_text|
  definitions.remove(auto_text) unless auto_text.mandatory?
}

Version:

  • LayOut 2018

Constant Summary #

Layout::AutoTextDefinition::TYPE_FILE
Layout::AutoTextDefinition::TYPE_PAGE_NAME
Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT
Layout::AutoTextDefinition::TYPE_DATE_CURRENT
Layout::AutoTextDefinition::TYPE_DATE_CREATED
Layout::AutoTextDefinition::TYPE_DATE_MODIFIED
Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED
Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_VOLUME
Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA
Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH
Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES
Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE
Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_ATTRIBUTE
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_ATTRIBUTE
Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC
Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED
Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA
Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA
Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN
Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN

Instance Method Summary # collapse

Instance Method Details

#==(other) ⇒ Boolean

The #== method checks to see if the two Layout::AutoTextDefinitions are equal. This checks whether the Ruby Objects are pointing to the same internal object.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.first == defs.last

Parameters:

Returns:

  • (Boolean)

Version:

  • LayOut 2018

#custom_textString

The #custom_text method returns the custom text of the Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
text = definitions.last.custom_text

Returns:

Raises:

Version:

  • LayOut 2018

#custom_text=(custom_text) ⇒ Object

The #custom_text method sets the custom text of the Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.last.custom_text = "Boop"

Parameters:

Raises:

Version:

  • LayOut 2018

#date_formatString

The #date_format method returns the date format of a Layout::AutoTextDefinition::TYPE_DATE_* Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
date_format = definitions.last.date_format

Returns:

Raises:

Version:

  • LayOut 2018

#date_format=(date_format) ⇒ Object

The #date_format method sets the date format of a Layout::AutoTextDefinition::TYPE_DATE_* Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.last.date_format = "mmddyyyy"

Parameters:

Raises:

Version:

  • LayOut 2018

#display_file_extension=(display_file_extension) ⇒ Object

The #display_file_extension= method sets whether the Layout::AutoTextDefinition::TYPE_FILE Layout::AutoTextDefinition displays the file extension.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.last.display_file_extension = false

Parameters:

  • display_file_extension (Boolean)

Raises:

Version:

  • LayOut 2018

#display_file_extension?Boolean

The #display_file_extension? method returns whether the Layout::AutoTextDefinition::TYPE_FILE Layout::AutoTextDefinition displays the file extension.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
show_file_extension = definitions.last.display_file_extension?

Returns:

  • (Boolean)

Raises:

Version:

  • LayOut 2018

#display_full_path=(display_full_path) ⇒ Object

The #display_full_path= method sets whether the Layout::AutoTextDefinition::TYPE_FILE Layout::AutoTextDefinition displays the full path.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.last.display_full_path = true

Parameters:

  • display_full_path (Boolean)

Raises:

Version:

  • LayOut 2018

#display_full_path?Boolean

The #display_full_path? method returns whether the Layout::AutoTextDefinition::TYPE_FILE Layout::AutoTextDefinition displays the full path.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
is_full_path = definitions.last.display_full_path?

Returns:

  • (Boolean)

Raises:

Version:

  • LayOut 2018

#mandatory?Boolean

The #mandatory? method returns whether the Layout::AutoTextDefinition is mandatory or not.

A mandatory Layout::AutoTextDefinition is one of the following types:

Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_VOLUME
Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA
Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH
Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES
Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE
Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.each { |auto_text|
  definitions.remove(auto_text) unless auto_text.mandatory?
}

Returns:

  • (Boolean)

Version:

  • LayOut 2018

#nameString

The #name method returns the name of the Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
name = definitions.first.name

Returns:

Version:

  • LayOut 2018

#name=(name) ⇒ Object

The #name= method sets the name of the Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.last.name = "New Name"

Parameters:

Raises:

Version:

  • LayOut 2018

#page_number_styleInteger

The #page_number_style method returns the numbering style for the Layout::AutoTextDefinition::TYPE_PAGE_NUMBER Layout::AutoTextDefinition.

The page numbering style can be one of the following values:

Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC
Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED
Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA
Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA
Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN
Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
number_style = definitions.last.page_number_style

Returns:

  • (Integer)

Raises:

Version:

  • LayOut 2018

#page_number_style=(number_style) ⇒ Object

The #page_number_style= method sets the numbering style for the Layout::AutoTextDefinition::TYPE_PAGE_NUMBER Layout::AutoTextDefinition.

The page numbering style can be one of the following values:

Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC
Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED
Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA
Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA
Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN
Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.last.page_number_style = Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN

Parameters:

  • number_style (Integer)

Raises:

  • (ArgumentError)

    if the Layout::AutoTextDefinition's type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER.

  • (ArgumentError)

    if number_style is not a valid page numbering style

Version:

  • LayOut 2018

#start_indexInteger

The #start_index method returns the start index for the Layout::AutoTextDefinition::TYPE_PAGE_NUMBER Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
start_index = definitions.first.start_index

Returns:

  • (Integer)

Raises:

Version:

  • LayOut 2018

#start_index=(index) ⇒ Object

The #start_index method returns the start index for the Layout::AutoTextDefinition::TYPE_PAGE_NUMBER Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
definitions.first.start_index = 3

Parameters:

  • index (Integer)

Raises:

Version:

  • LayOut 2018

#tagString

The #tag method returns the tag string of the Layout::AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
tag = definitions.first.tag

Returns:

Version:

  • LayOut 2018

#typeInteger

The #type method returns the type of the Layout::AutoTextDefinition.

The type can be one of the following values:

Layout::AutoTextDefinition::TYPE_FILE
Layout::AutoTextDefinition::TYPE_PAGE_NAME
Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT
Layout::AutoTextDefinition::TYPE_DATE_CURRENT
Layout::AutoTextDefinition::TYPE_DATE_CREATED
Layout::AutoTextDefinition::TYPE_DATE_MODIFIED
Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED
Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_VOLUME
Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA
Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH
Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES
Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE
Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
type = definitions.first.type

Returns:

  • (Integer)

Version:

  • LayOut 2018