maptek.vulcan.text3d

Interface for Vulcan design text (3D).


num_lines(text3d self) → int

Returns the number of text lines.

# Filename: text3d_num_lines.py
# Purpose: Returns the number of text lines.
# Returns: int

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_num_lines = txt3d_obj.num_lines()  # get the number of lines
    print(txt3d_num_lines)

get_line(text3d self, int line_num) → std::string

Gets a text line by index.

# Filename: text3d_get_line.py
# Purpose: Gets a line of text by index.
# Returns: string

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_line = txt3d_obj.get_line(1)  # get second line of text
    print(txt3d_line)

append(text3d self, std::string const & line)

Appends a new line of text.

# Filename: text3d_append.py
# Purpose: Appends a line of text.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.append('add another line')  # append new line of text
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

set_line(text3d self, int line_num, std::string const & line)

Sets a line of text by index.

# Filename: text3d_set_line.py
# Purpose: Sets a line of text by index.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_line(2, 'third line')  # edit third line of text
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

delete_line(text3d self, int line_num)

Deletes a line of text.

# Filename: text3d_delete_line.py
# Purpose: Deletes a line of text by index.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.delete_line(1)  # delete second line of text (index 1)
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

delete_all_lines(text3d self)

Deletes all lines of text.

# Filename: text3d_delete_all_lines.py
# Purpose: Deletes all lines of text.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.delete_all_lines()  # delete all lines
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

get_origin(text3d self) → point

Gets the origin point.

# Filename: text3d_get_origin.py
# Purpose: Get the origin of text.
# Returns: point

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_origin = txt3d_obj.get_origin()  # get the number of lines
    print(txt3d_origin)

set_origin(text3d self, point pt)

Sets the origin point.

# Filename: text3d_set_origin.py
# Purpose: Get the origin of text.
# Returns: point

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_origin([78000.0, 5000.0, 0.0])
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

get_direction(text3d self) → point

Gets the text direction (point with x/y/z)

# Filename: text3d_get_direction.py
# Purpose: Gets the text direction (point with x/y/z)
# Returns: Point

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_direction = txt3d_obj.get_direction()  # get direction of text
    print(txt3d_direction)

set_direction(text3d self, point direction)

Sets the text direction.

Parameter: The point containing the [x,y,z] direction to set.

# Filename: text3d_set_direction.py
# Purpose: Sets the text direction.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_direction([1.0, 0.0, 0.0, 0.0, 0, ''])
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

get_normal(text3d self) → point

Gets the text normal.

# Filename: text3d_get_normal.py
# Purpose: Gets the text normal, the up direction in the form of a unit vector.
# Returns: string

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_normal = txt3d_obj.get_normal()  # get the text normal
    print(txt3d_normal)

set_normal(text3d self, point normal)

Sets the text normal.

 

get_scale(text3d self) → std::string

Gets the text scale.

# Filename: text3d_get_scale.py
# Purpose: Gets the text scale.
# Returns: string

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_scale = txt3d_obj.get_scale()  # get second line of text
    print(txt3d_scale)

set_scale(text3d self, std::string const & scale)

Sets the text scale.

# Filename: text3d_set_scale.py
# Purpose: Sets the text scale.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_scale('1:16500')  # set the scale
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

get_height(text3d self) → double

Gets the text height.

# Filename: text3d_get_height.py
# Purpose: Gets the text height.
# Returns: float

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_ht = txt3d_obj.get_height()  # get second line of text
    print(txt3d_ht)

set_height(text3d self, double height)

Sets the text height.

# Filename: text3d_set_height.py
# Purpose: Sets the text height.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_height(0.1)  # set the text height in plotter units
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

get_width(text3d self) → double

Gets the text width.

# Filename: text3d_get_width.py
# Purpose: Gets the text width.
# Returns: float

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_width = txt3d_obj.get_width()  # get second line of text
    print(txt3d_width)

set_width(text3d self, double width)

Sets the text width.

# Filename: text3d_set_width.py
# Purpose: Sets the text width.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_width(0.1)  # set the text height in plotter units
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

get_font(text3d self) → std::string

Gets the text font.

# Filename: text3d_get_font.py
# Purpose: Gets the text font.
# Returns: string

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_font = txt3d_obj.get_font()  # get text font
    print(txt3d_font)

set_font(text3d self, std::string const & font)

Sets the text font.

# Filename: text3d_set_font.py
# Purpose: Sets the text font.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_font('Courier New')  # set the text height in plotter units
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

is_italic(text3d self) → bool

Gets the text italic setting (bool).

# Filename: text3d_is_italic.py
# Purpose: Gets the text italic setting(bool).
# Returns: Bool

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_italic = txt3d_obj.is_italic()
    print(txt3d_italic)
set_italic(text3d self, bool italic=True)

Sets the font italics.

# Filename: text3d_set_italic.py
# Purpose: Sets the font italics.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_italic()  # Set the font italics.
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save the layer

is_mirrored_vertical(text3d self) → bool

Gets the text mirror (vertical)

# Filename: text3d_is_mirrored_vertical.py
# Purpose: Check if the text is mirrored vertical.
# Returns: bool

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_mirrored_vertical = txt3d_obj.is_mirrored_vertical()
    print(txt3d_mirrored_vertical)

set_mirrored_vertical(text3d self, bool mirror=True)

Sets the text mirror (vertical)

# Filename: text3d_set_mirrored_vertical.py
# Purpose: Set the text as mirrored vertical.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_mirrored_vertical(True)
    layer.set_object(0, txt3d_obj)
    dgd.save_layer(layer)

is_mirrored_horizontal(text3d self) → bool

Gets the text mirror (horizontal)

# Filename: text3d_is_mirrored_horizontal.py
# Purpose: Check if the text is mirrored horizontally.
# Returns: bool

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_mirrored_horizontal = txt3d_obj.is_mirrored_horizontal()
    print(txt3d_mirrored_horizontal)

set_mirrored_horizontal(text3d self, bool mirror=True)

Sets the text mirror (horizontal)

# Filename: text3d_set_mirrored_horizontal.py
# Purpose: Set the text as mirrored horizontally.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_mirrored_horizontal(True)
    layer.set_object(0, txt3d_obj)
    dgd.save_layer(layer)

get_horizontal_align(text3d self) → std::string

Gets the horizontal alignment.

# Filename: text3d_get_horizontal_align.py
# Purpose: Gets the horizontal alignment.
# Returns: bool

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_hor_align = txt3d_obj.get_horizontal_align()
    print(txt3d_hor_align)

set_horizontal_align(text3d self, std::string const & alignment)

Sets the horizontal alignment.

Options are LEFT, CENTRE, and RIGHT.

# Filename: text3d_set_horizontal_align.py
# Purpose: Sets the horizontal alignment.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_horizontal_align('LEFT')
    layer.set_object(0, txt3d_obj)
    dgd.save_layer(layer)

get_vertical_align(text3d self) → std::string

Gets the vertical alignment.

# Filename: text3d_get_vertical_align.py
# Purpose: Gets the vertical alignment.
# Returns: bool

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'r') as dgd:  # open up the database in read mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_vert_align = txt3d_obj.get_vertical_align()
    print(txt3d_vert_align)

set_vertical_align(text3d self, std::string const & alignment)

Sets the vertical alignment.

# Filename: text3d_set_vertical_align.py
# Purpose: Sets the vertical alignment.
# Returns: null

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object
    txt3d_obj.set_vertical_align('BOTTOM')
    layer.set_object(0, txt3d_obj)
    dgd.save_layer(layer)

Options are BOTTOM, CENTRE, and TOP

property origin → point

Text origin

# Filename: text3d_property_origin.py
# Purpose: Get or set text3d origin using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get origin using property method
    print(f'origin: {txt3d_obj.origin}')

    # set origin using property method
    txt3d_obj.origin = vulcan.point(75000.0, 5000.0, 0.0, 0.0, 0, '')
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property direction → point

Text direction

# Filename: text3d_property_direction.py
# Purpose: Get or set text3d direction using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get direction using property method
    print(f'direction: {txt3d_obj.direction}')

    # set direction using property method
    txt3d_obj.direction = vulcan.point(1.0, 0.0, 0.0, 0.0, 0, '')
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property normal → point

Text normal

# Filename: text3d_property_normal.py
# Purpose: Get or set text3d normal using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get normal using property method
    print(f'normal: {txt3d_obj.normal}')

    # set normal using property method
    txt3d_obj.normal = vulcan.point(0.0, 1.0, 0.0, 0.0, 0, '')
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property scale → std::string

Text scale

# Filename: text3d_property_scale.py
# Purpose: Get or set text3d scale using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get scale using property method
    print(f'scale: {txt3d_obj.scale}')

    # set scale using property method
    txt3d_obj.scale = '1:12500'
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property height → double

Text height

# Filename: text3d_property_height.py
# Purpose: Get or set text3d height using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get height using property method
    print(f'height: {txt3d_obj.height}')

    # set height using property method
    txt3d_obj.height = 0.1
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property width → double

Text width

# Filename: text3d_property_width.py
# Purpose: Get or set text3d width using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get width using property method
    print(f'width: {txt3d_obj.width}')

    # set width using property method
    txt3d_obj.width = 0.1
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property font → std::string

Text font

# Filename: text3d_property_font.py
# Purpose: Get or set text3d font using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get font using property method
    print(f'font: {txt3d_obj.font}')

    # set font using property method
    txt3d_obj.font = 'Courier New'
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property italic → bool

Text italic setting

# Filename: text3d_property_italic.py
# Purpose: Get or set text3d italic using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get italic using property method
    print(f'italic: {txt3d_obj.italic}')

    # set italic using property method
    txt3d_obj.italic = True
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property mirrored_vertical → bool

Is text mirrored vertically

# Filename: text3d_property_mirrored_vertical.py
# Purpose: Get or set text3d mirrored_vertical using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get mirrored_vertical using property method
    print(f'mirrored_vertical: {txt3d_obj.mirrored_vertical}')

    # set mirrored_vertical using property method
    txt3d_obj.mirrored_vertical = False
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property mirrored_horizontal → bool

Is text mirrored horizontally

# Filename: text3d_property_mirrored_horizontal.py
# Purpose: Get or set text3d mirrored_horizontal using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get mirrored_horizontal using property method
    print(f'mirrored_horizontal: {txt3d_obj.mirrored_horizontal}')

    # set mirrored_horizontal using property method
    txt3d_obj.mirrored_horizontal = False
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property horizontal_align → std::string

Is text aligned horizontally

# Filename: text3d_property_horizontal_align.py
# Purpose: Get or set text3d horizontal_align using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get horizontal_align using property method
    print(f'horizontal_align: {txt3d_obj.horizontal_align}')

    # set horizontal_align using property method
    txt3d_obj.horizontal_align = 'LEFT'
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer

property vertical_align → std::string

Is text aligned vertically

# Filename: text3d_property_vertical_align.py
# Purpose: Get or set text3d vertical_align using property method.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database we want to access
layer_name = "TEXT3D"  # name of layer we want to use

with vulcan.dgd(dgd_file, 'w') as dgd:  # open database in write mode
    assert dgd.is_layer(layer_name), 'error: layer does not exist'
    layer = dgd.get_layer(layer_name)  # get layer

    txt3d_obj = layer.get_object(0)  # get the text object

    # get vertical_align using property method
    print(f'vertical_align: {txt3d_obj.vertical_align}')

    # set vertical_align using property method
    txt3d_obj.vertical_align = 'LEFT'
    layer.set_object(0, txt3d_obj)  # replace the old text
    dgd.save_layer(layer)  # save layer