All Frameworks  Object Hierarchy  This Framework  Indexes   

DrawingTextRange (Object)

Represents a drawing text range, or contiguous area, in a drawing text.

A range is a contiguous area in a drawing text defined by the position of a starting and ending character, or by the position of a starting character and a length expressed in number of characters.


Property Index

Length
Returns the number of characters of the drawing text range.
Start
Returns the starting character position of the drawing text range.
TextProperties
Text
Returns or sets the character string making up the drawing text range.

Method Index

GetTextRange
Returns a drawing text range within another drawing text range.
InsertAfter
Inserts a character string at the end of the drawing text range.
InsertBefore
Inserts a character string at the beginning of the drawing text range.

Properties


o Property Length() As (Read Only)
Returns the number of characters of the drawing text range.
Example:
This example retrieves in NbChar the number of characters of the MyTextRange drawing text range.
 NbChar = MyTextRange.Length
 
o Property Start() As (Read Only)
Returns the starting character position of the drawing text range.
Example:
This example retrieves in StartCharPosthe starting character position of the MyTextRange drawing text range.
 StartCharPos = MyTextRange.Start
 
o Property TextProperties() As (Read Only)
Deprecated:
V5R18 use DrawingWelding.TextProperties This method has not to be used to manage the text range properties. Text properties is only applied on the whole text, not on a sub text identified by a text range. Returns the drawing text range properties.
Example:
This example returns in Prop the text properties of the MyTextRange drawing text range.
 Dim Prop As CATIADrawingTextProperties
 Set Prop = MyTextRange.TextProperties(String)
 
o Property Text() As
Returns or sets the character string making up the drawing text range.
Example:
This example sets in text the character string that makes up the MyTextRange drawing text range.
 MyTextRange.Text = text
 Set MyTextProperties = MyTextRange.TextProperties
 MyTextProperties.Update
 
See also:
DrawingTextProperties.Update

Methods


o Func GetTextRange( iStart,
iEnd) As
Returns a drawing text range within another drawing text range. The text range is retrieved using its starting and ending character positions.
Parameters:
iStart
The position of the drawing text range starting character
iEnd
The position of the drawing text range ending character
Example:
This example retrieves in extractedTextRange the drawing text range that begins at the eighth character and end at the fifteenth character of the MyTextRange drawing text range.
 Dim extractedTextRange As DrawingTextRange
 start = 8
 end = 15
 extractedTextRange = MyTextRange.GetTextRange(start, end)
 
o Sub InsertAfter( iString)
Inserts a character string at the end of the drawing text range.
Parameters:
iString
The character string to be added
Example:
This example inserts the String character string at the end of the MyTextRange drawing text range.
 String = "String to insert after"
 MyTextRange.InsertAfter(String)
 Set MyTextProperties = MyTextRange.TextProperties
 MyTextProperties.Update
 
See also:
DrawingTextProperties.Update
o Sub InsertBefore( iString)
Inserts a character string at the beginning of the drawing text range.
Parameters:
iString
The character string to be added
Example:
This example inserts the String character string at the beginning of the MyTextRange drawing text range.
 String = "String to insert before"
 MyTextRange.InsertBefore(String)
 Set MyTextProperties = MyTextRange.TextProperties
 MyTextProperties.Update
 
See also:
DrawingTextProperties.Update

Copyright © 2003, Dassault Systèmes. All rights reserved.