Skip to content

Understanding and Using create_text_object_with_options: Examples and Explanation of text_options #214

Closed Answered by Brunner246
WSBATMAN asked this question in Q&A
Discussion options

You must be logged in to vote
def create_text_option_data(text: str, element_type: cadwork.text_element_type):
    text_options = cadwork.text_object_options()
    text_options.set_color(5)
    text_options.set_element_type(element_type)
    text_options.set_text(text)
    text_options.set_height(100.0)
    text_options.set_thickness(5.0)

    return text_options
    
options = create_text_option_data("hello world", cadwork.text_element_type.surface)
ec.create_text_object_with_options(#origin cadwork.point_3d(....), 
                                 #x_direction cadwork.point_3d(....), 
                                 #z_direction cadwork.point_3d(....), 
                                 options)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@WSBATMAN
Comment options

Answer selected by WSBATMAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants