Class: Layout::LinearDimension
- Defined in:
- lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb
Overview
References a linear dimension entity. A LinearDimension is composed of the following sub-entities:
- 
two ‘extension lines’ that connect to the Entity being dimensioned. 
- 
a ‘dimension line’ connecting the ends of the leaders. This may be represented by one or two Paths depending on appearance. 
- 
an optional ‘leader line’ that is used for small LinearDimensions. 
- 
a ‘dimension text’ that displays the LinearDimension‘s text. 
There are six points that may be modified for a LinearDimension:
- 
two ‘connection points’ that define the start and end of the LinearDimension. 
- 
two ‘extent points’ that define the start and end of the dimension line and are the ends of the two extension lines. 
- 
two ‘offset points’ that define the starting points of the extension lines. 
Constant Summary collapse
- LEADER_LINE_TYPE_BEZIER =
          Constants 
- nil
- LEADER_LINE_TYPE_HIDDEN =
          Stub value. 
- nil
- LEADER_LINE_TYPE_SINGLE_SEGMENT =
          Stub value. 
- nil
- LEADER_LINE_TYPE_TWO_SEGMENT =
          Stub value. 
- nil
Instance Method Summary collapse
- 
  
    
      #auto_scale=(uses_auto_scale)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #auto_scale= method sets whether the scale for the LinearDimension is set automatically. 
- 
  
    
      #auto_scale?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    The #auto_scale? method returns whether the scale for the LinearDimension is set automatically. 
- 
  
    
      #connect(start_connection, end_connection)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #connect method connects the LinearDimension to one or two Entitys using the provided ConnectionPoints. 
- 
  
    
      #custom_text=(uses_custom_text)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #custom_text= method sets whether the LinearDimension uses custom text. 
- 
  
    
      #custom_text?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    The #custom_text? method returns whether the LinearDimension uses custom text. 
- 
  
    
      #disconnect  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #disconnect method disconnects the LinearDimension from its ConnectionPoints. 
- 
  
    
      #end_connection_point  ⇒ Geom::Point2d 
    
    
  
  
  
  
  
  
  
  
  
    The #end_connection_point method returns the paper space location for the second connection. 
- 
  
    
      #end_connection_point=(end_point)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #end_connection_point= method sets the paper space location for the second connection. 
- 
  
    
      #end_extent_point  ⇒ Geom::Point2d 
    
    
  
  
  
  
  
  
  
  
  
    The #end_extent_point method returns the paper space location for the end of the dimension line. 
- 
  
    
      #end_extent_point=(end_extent)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #end_extent_point= method sets the paper space location for the end of the dimension line. 
- 
  
    
      #end_offset_length=(offset_length)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #end_offset_length= method sets the length of the offset from the second ConnectionPoint to the start of the second extension line. 
- 
  
    
      #end_offset_point  ⇒ Geom::Point2d 
    
    
  
  
  
  
  
  
  
  
  
    The #end_offset_point method returns the paper space location for the end of the first extension line. 
- 
  
    
      #entities  ⇒ Layout::Entities 
    
    
  
  
  
  
  
  
  
  
  
    The #entities method returns the Entities that represent the LinearDimension in its exploded form. 
- 
  
    
      #initialize(start_point, end_point, height)  ⇒ Layout::LinearDimension 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    The #initialize method creates a new disconnected LinearDimension. 
- 
  
    
      #leader_line_type  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  
  
    The #leader_line_type method returns the type of leader line the LinearDimension is using. 
- 
  
    
      #leader_line_type=(type)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #leader_line_type= method sets the type of leader line the LinearDimension is using. 
- 
  
    
      #scale  ⇒ Numeric 
    
    
  
  
  
  
  
  
  
  
  
    The #scale method returns the scale being used for the LinearDimension. 
- 
  
    
      #scale=(scale)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #scale= method sets the scale being used for the LinearDimension. 
- 
  
    
      #start_connection_point  ⇒ Geom::Point2d 
    
    
  
  
  
  
  
  
  
  
  
    The #start_connection_point method returns the paper space location for the first connection. 
- 
  
    
      #start_connection_point=(start_point)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #start_connection_point= method sets the paper space location for the first connection. 
- 
  
    
      #start_extent_point  ⇒ Geom::Point2d 
    
    
  
  
  
  
  
  
  
  
  
    The #start_extent_point method returns the paper space location for the start of the dimension line. 
- 
  
    
      #start_extent_point=(start_extent)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #start_extent_point= method sets the paper space location for the start of the dimension line. 
- 
  
    
      #start_offset_length=(offset_length)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #start_offset_length= method sets the length of the offset from the first ConnectionPoint to the start of the first extension line. 
- 
  
    
      #start_offset_point  ⇒ Geom::Point2d 
    
    
  
  
  
  
  
  
  
  
  
    The #start_offset_point method returns the paper space location for the start of the first extension line. 
- 
  
    
      #text  ⇒ Layout::FormattedText 
    
    
  
  
  
  
  
  
  
  
  
    The #text method returns a copy of the LinearDimension‘s FormattedText. 
- 
  
    
      #text=(formatted_text)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The #text= method sets the LinearDimension‘s FormattedText. 
Methods inherited from Entity
#==, #bounds, #document, #drawing_bounds, #group, #layer_instance, #locked=, #locked?, #move_to_group, #move_to_layer, #on_shared_layer?, #page, #style, #style=, #transform!, #transformation, #untransformed_bounds, #untransformed_bounds=
Constructor Details
#initialize(start_point, end_point, height) ⇒ Layout::LinearDimension
The #initialize method creates a new disconnected Layout::LinearDimension.
| 316 317 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 316 def initialize(start_point, end_point, height) end | 
Instance Method Details
#auto_scale=(uses_auto_scale) ⇒ Object
The #auto_scale= method sets whether the scale for the Layout::LinearDimension is set automatically.
| 50 51 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 50 def auto_scale=(uses_auto_scale) end | 
#auto_scale? ⇒ Boolean
The #auto_scale? method returns whether the scale for the Layout::LinearDimension is set automatically.
| 66 67 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 66 def auto_scale? end | 
#connect(start_connection, end_connection) ⇒ Object
The #connect method connects the Layout::LinearDimension to one or two Entitys using the provided ConnectionPoints. The Layout::LinearDimension must be in the same Document as the Entitys, and on the same Page if the Entitys are on non-shared Layout::Layers.
| 98 99 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 98 def connect(start_connection, end_connection) end | 
#custom_text=(uses_custom_text) ⇒ Object
The #custom_text= method sets whether the Layout::LinearDimension uses custom text. When true, the Layout::LinearDimension will display a custom string that doesn’t change. When false, it will display the length measurement and will update automatically.
| 121 122 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 121 def custom_text=(uses_custom_text) end | 
#custom_text? ⇒ Boolean
The #custom_text? method returns whether the Layout::LinearDimension uses custom text. When true, the Layout::LinearDimension will display a custom string that doesn’t change. When false, it will display the length measurement and will update automatically.
| 140 141 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 140 def custom_text? end | 
#disconnect ⇒ Object
The #disconnect method disconnects the Layout::LinearDimension from its ConnectionPoints. The dimension will not be adjusted by disconnecting from its ConnectionPoints.
| 160 161 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 160 def disconnect end | 
#end_connection_point ⇒ Geom::Point2d
The #end_connection_point method returns the paper space location for the second connection.
| 176 177 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 176 def end_connection_point end | 
#end_connection_point=(end_point) ⇒ Object
The #end_connection_point= method sets the paper space location for the second connection.
| 197 198 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 197 def end_connection_point=(end_point) end | 
#end_extent_point ⇒ Geom::Point2d
The #end_extent_point method returns the paper space location for the end of the dimension line.
| 213 214 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 213 def end_extent_point end | 
#end_extent_point=(end_extent) ⇒ Object
The #end_extent_point= method sets the paper space location for the end of the dimension line.
| 235 236 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 235 def end_extent_point=(end_extent) end | 
#end_offset_length=(offset_length) ⇒ Object
The #end_offset_length= method sets the length of the offset from the second ConnectionPoint to the start of the second extension line. The ConnectionPoint and extent point will not move.
| 258 259 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 258 def end_offset_length=(offset_length) end | 
#end_offset_point ⇒ Geom::Point2d
The #end_offset_point method returns the paper space location for the end of the first extension line. The first extension line runs from this offset point to the end extent point.
| 275 276 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 275 def end_offset_point end | 
#entities ⇒ Layout::Entities
The #entities method returns the Entities that represent the Layout::LinearDimension in its exploded form. Depending on the appearance of the Layout::LinearDimension, this may return anywhere from four to six Entitys: start extension line, end extension line, one or two dimension lines, dimension text, and optionally the leader line.
| 294 295 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 294 def entities end | 
#leader_line_type ⇒ Integer
The #leader_line_type method returns the type of leader line the Layout::LinearDimension is using.
The leader line type can be one of the following:
- Layout::LinearDimension::LEADER_LINE_TYPE_SINGLE_SEGMENT
- Layout::LinearDimension::LEADER_LINE_TYPE_TWO_SEGMENT
- Layout::LinearDimension::LEADER_LINE_TYPE_BEZIER
- Layout::LinearDimension::LEADER_LINE_TYPE_HIDDEN
| 338 339 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 338 def leader_line_type end | 
#leader_line_type=(type) ⇒ Object
The #leader_line_type= method sets the type of leader line the Layout::LinearDimension is using.
The leader line type can be one of the following:
- Layout::LinearDimension::LEADER_LINE_TYPE_SINGLE_SEGMENT
- Layout::LinearDimension::LEADER_LINE_TYPE_TWO_SEGMENT
- Layout::LinearDimension::LEADER_LINE_TYPE_BEZIER
- Layout::LinearDimension::LEADER_LINE_TYPE_HIDDEN
| 368 369 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 368 def leader_line_type=(type) end | 
#scale ⇒ Numeric
The #scale method returns the scale being used for the Layout::LinearDimension.
| 384 385 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 384 def scale end | 
#scale=(scale) ⇒ Object
The #scale= method sets the scale being used for the Layout::LinearDimension.
| 407 408 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 407 def scale=(scale) end | 
#start_connection_point ⇒ Geom::Point2d
The #start_connection_point method returns the paper space location for the first connection.
| 423 424 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 423 def start_connection_point end | 
#start_connection_point=(start_point) ⇒ Object
The #start_connection_point= method sets the paper space location for the first connection.
| 444 445 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 444 def start_connection_point=(start_point) end | 
#start_extent_point ⇒ Geom::Point2d
The #start_extent_point method returns the paper space location for the start of the dimension line.
| 460 461 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 460 def start_extent_point end | 
#start_extent_point=(start_extent) ⇒ Object
The #start_extent_point= method sets the paper space location for the start of the dimension line.
| 482 483 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 482 def start_extent_point=(start_extent) end | 
#start_offset_length=(offset_length) ⇒ Object
The #start_offset_length= method sets the length of the offset from the first ConnectionPoint to the start of the first extension line. The ConnectionPoint and extent point will not move.
| 505 506 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 505 def start_offset_length=(offset_length) end | 
#start_offset_point ⇒ Geom::Point2d
The #start_offset_point method returns the paper space location for the start of the first extension line. The first extension line runs from this offset point to the start extent point.
| 522 523 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 522 def start_offset_point end | 
#text ⇒ Layout::FormattedText
The #text method returns a copy of the Layout::LinearDimension‘s FormattedText.
| 538 539 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 538 def text end | 
#text=(formatted_text) ⇒ Object
The #text= method sets the Layout::LinearDimension‘s FormattedText.
| 560 561 | # File 'lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb', line 560 def text=(formatted_text) end |