123456789_123456789_123456789_123456789_123456789_

Class: Layout::AutoTextDefinition

Relationships
Inherits: Object

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
Layout::AutoTextDefinition::TYPE_MODEL_SCENE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_SCENE_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_SCALE
Layout::AutoTextDefinition::TYPE_MODEL_SECTION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_SECTION_SYMBOL

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

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#custom_textString (rw)

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

Examples:

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

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT

Version:

  • LayOut 2018

#custom_text=(custom_text) (rw)

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

Examples:

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

Parameters:

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT

  • (TypeError)

    if custom_text is not a ::String or convertable to a ::String.

Version:

  • LayOut 2018

#date_formatString (rw)

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

Examples:

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

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_DATE_*.

Version:

  • LayOut 2018

#date_format=(date_format) (rw)

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

Examples:

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

Parameters:

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_DATE_*.

  • (TypeError)

    if date_format is not a ::String or convertable to a ::String.

Version:

  • LayOut 2018

#display_file_extension=(display_file_extension) (rw)

The #display_file_extension= method sets whether the Layout::AutoTextDefinition::TYPE_FILE 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:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_FILE.

Version:

  • LayOut 2018

#display_file_extension?Boolean (rw)

The #display_file_extension? method returns whether the Layout::AutoTextDefinition::TYPE_FILE 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?

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_FILE.

Version:

  • LayOut 2018

#display_full_path=(display_full_path) (rw)

The #display_full_path= method sets whether the Layout::AutoTextDefinition::TYPE_FILE 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:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_FILE.

Version:

  • LayOut 2018

#display_full_path?Boolean (rw)

The #display_full_path? method returns whether the Layout::AutoTextDefinition::TYPE_FILE 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?

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_FILE.

Version:

  • LayOut 2018

#end_pageLayout::Page? (rw)

The #end_page method returns the end page for the Layout::AutoTextDefinition::TYPE_PAGE_COUNT AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
page_count_def =
    doc.auto_text_definitions.add("PageCount", Layout::AutoTextDefinition::TYPE_PAGE_COUNT)
# Default end_page value is nil, meaning count to the end of the document
page = page_count_def.end_page

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_COUNT.

Version:

  • LayOut 2022.0

#end_page=(page) (rw)

The #end_page= method sets the end page for the Layout::AutoTextDefinition::TYPE_PAGE_COUNT AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
definitions = doc.auto_text_definitions
page_count_def =
    doc.auto_text_definitions.add("PageCount", Layout::AutoTextDefinition::TYPE_PAGE_COUNT)
# Stop the PageCount auto-text at this newly created page instead of at the end of the document
page_count_def.end_page = doc.pages.add("new page")

Parameters:

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_COUNT.

Version:

  • LayOut 2022.0

#incrementInteger (rw)

The #increment method returns the increment value for Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinitions.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
# Default sequence increment value is 1
increment = sequence_def.increment

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2022.0

#increment=(increment) (rw)

The #increment= method sets the increment value for Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinitions.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
sequence_def.increment = 10

Parameters:

  • increment (Integer)

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2022.0

#mandatory?Boolean (readonly)

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

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
Layout::AutoTextDefinition::TYPE_MODEL_SCENE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_SCENE_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_SCALE
Layout::AutoTextDefinition::TYPE_MODEL_SECTION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_SECTION_SYMBOL

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

#nameString (rw)

The #name method returns the name of the AutoTextDefinition.

Examples:

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

Version:

  • LayOut 2018

#name=(name) (rw)

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

Examples:

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

Parameters:

Raises:

  • (ArgumentError)

    if the AutoTextDefinition is a mandatory type

  • (ArgumentError)

    if name matches an existing AutoTextDefinition

  • (ArgumentError)

    if name is an empty string

  • (TypeError)

    if name is not a ::String or convertable to a ::String.

Version:

  • LayOut 2018

#number_styleInteger (rw)

The #number_style method returns the numbering style for Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, and Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinitions.

The 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")
sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
number_style = sequence_def.number_style

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, or Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2022.0

#number_style=(number_style) (rw)

The #number_style= method sets the numbering style for Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, and Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinitions.

The 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")
sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
sequence_def.number_style = Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN

Parameters:

  • number_style (Integer)

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, or Layout::AutoTextDefinition::TYPE_SEQUENCE.

  • (ArgumentError)

    if number_style is not a valid page numbering style

Version:

  • LayOut 2022.0

#page_number_styleInteger (rw)

Deprecated.

LayOut 2022.0 This method is deprecated in favor of the more generic #number_style method that also works on Layout::AutoTextDefintion::TYPE_PAGE_COUNT and Layout::AutoTextDefintion::TYPE_SEQUENCE AutoTextDefinitions.

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

The 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")
page_number_def = doc.auto_text_definitions.add("RomanPageNumbers",
  Layout::AutoTextDefinition::TYPE_PAGE_NUMBER) number_style = page_number_def.number_style

Raises:

  • (ArgumentError)

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

Version:

  • LayOut 2018

#page_number_style=(number_style) (rw)

Deprecated.

LayOut 2022.0 This method is deprecated in favor of the more generic #number_style= method that also works on Layout::AutoTextDefintion::TYPE_PAGE_COUNT and Layout::AutoTextDefintion::TYPE_SEQUENCE AutoTextDefinitions.

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

The 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")
page_number_def = doc.auto_text_definitions.add("RomanPageNumbers",
  Layout::AutoTextDefinition::TYPE_PAGE_NUMBER)
page_number_def.page_number_style = Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN

Parameters:

  • number_style (Integer)

Raises:

  • (ArgumentError)

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

  • (ArgumentError)

    if number_style is not a valid page numbering style

Version:

  • LayOut 2018

#sequence_formatString (rw)

The #sequence_format method returns the sequence format of a Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
# Default sequence format is ###, meaning entirely replace the string with the sequence number
sequence = sequence_def.sequence

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2022.0

#sequence_format=(sequence_format) (rw)

The #sequence_format= method sets the sequence format of a Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinition.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
sequence_def.sequence = "Figure ###"

Parameters:

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

  • (TypeError)

    if sequence_format is not a ::String or convertable to a ::String.

Version:

  • LayOut 2022.0

#sequence_typeInteger (rw)

The #sequence_type method returns how the Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinition operates over multiple pages in a document.

The sequence type can be one of the following values:

Layout::AutoTextDefinition::SEQUENCE_TYPE_PER_DOCUMENT
Layout::AutoTextDefinition::SEQUENCE_TYPE_PER_PAGE

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
type = sequence_def.sequence_type

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2023.0

#sequence_type=(sequence_type) (rw)

The #sequence_type= method sets how the Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinition operates over multiple pages in a document.

The sequence type can be one of the following values:

Layout::AutoTextDefinition::SEQUENCE_TYPE_PER_DOCUMENT
Layout::AutoTextDefinition::SEQUENCE_TYPE_PER_PAGE

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
sequence_def.sequence_type = Layout::AutoTextDefinition::SEQUENCE_TYPE_PER_PAGE

Parameters:

  • sequence_type (Integer)

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

  • (ArgumentError)

    if sequence_type is not a valid sequence type

Version:

  • LayOut 2023.0

#start_indexInteger (rw)

The #start_index method returns the start index for Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, and Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinitions.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
start_index = sequence_def.start_index

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, or Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2018

#start_index=(index) (rw)

The #start_index= method sets the start index for Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, and Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinitions.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
sequence_def.start_index = 10

Parameters:

  • index (Integer)

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER, Layout::AutoTextDefinition::TYPE_PAGE_COUNT, or Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2018

#start_pageLayout::Page (rw)

The #start_page method returns the start page for Layout::AutoTextDefinition::TYPE_PAGE_NUMBER and Layout::AutoTextDefinition::TYPE_PAGE_COUNT AutoTextDefinitions.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
page_number_def =
    doc.auto_text_definitions.add("PageNumber", Layout::AutoTextDefinition::TYPE_PAGE_NUMBER)
# Default start page is the first page of the document. However we continue to start at that
# page even if that page is moved.
page = page_number_def.start_page
p page == doc.pages[0]
doc.pages.add('new page')
doc.pages.reorder(doc.pages[0], 1)
p page == doc.pages[1]

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER or Layout::AutoTextDefinition::TYPE_PAGE_COUNT.

Version:

  • LayOut 2022.0

#start_page=(page) (rw)

The #start_page= method sets the start page for Layout::AutoTextDefinition::TYPE_PAGE_NUMBER and Layout::AutoTextDefinition::TYPE_PAGE_COUNT AutoTextDefinitions.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
page_number_def =
    doc.auto_text_definitions.add("PageNumber", Layout::AutoTextDefinition::TYPE_PAGE_NUMBER)
# Start the PageCount auto-text on the new page
page_number_def.start_page = doc.pages.add('new page')

Parameters:

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_PAGE_NUMBER or Layout::AutoTextDefinition::TYPE_PAGE_COUNT.

Version:

  • LayOut 2022.0

Instance Method Details

#==(other) ⇒ Boolean

The #== method checks to see if the two 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:

  • other (AutoTextDefinition)

Version:

  • LayOut 2018

#renumber

The #renumber method iterates through all uses of the Layout::AutoTextDefinition::TYPE_SEQUENCE AutoTextDefinition and eliminates gaps and duplicates in the sequence.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
sequence_def =
    doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
sequence_def.renumber

Raises:

  • (ArgumentError)

    if the AutoTextDefinition‘s type is not Layout::AutoTextDefinition::TYPE_SEQUENCE.

Version:

  • LayOut 2022.0

#tagString

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

Examples:

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

Version:

  • LayOut 2018

#typeInteger

The #type method returns the type of the 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
Layout::AutoTextDefinition::TYPE_MODEL_SCENE_NAME
Layout::AutoTextDefinition::TYPE_MODEL_SCENE_DESCRIPTION
Layout::AutoTextDefinition::TYPE_MODEL_SCALE
Layout::AutoTextDefinition::TYPE_MODEL_SECTION_NAME
Layout::AutoTextDefinition::TYPE_MODEL_SECTION_SYMBOL
Layout::AutoTextDefinition::TYPE_PAGE_COUNT
Layout::AutoTextDefinition::TYPE_SEQUENCE

Examples:

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

Version:

  • LayOut 2018