User Tools

Site Tools


Sidebar

Home



PlanetCNC SDK


TNG API

Python

  About
  Installation

  Module 'planetcnc'
   print
   expr

   App status
    is_running
    is_initialized
    starttime

   Version & Profile Info
    get_ver
    get_version
    get_profile_name
    get_profile_path
    get_description

   Paths
    get_path
    get_path_exe
    get_path_profile
    get_path_temp
    get_path_working

   Parameters
    param_get
    param_set
    param_remove
    param_persistent

   Machine Commands
    estop
    stop
    pause
    start

    open
    close

    output
    output_pwm
    output_rc

    cmd_list
    cmd_count

    cmd_get_id
    cmd_get_name
    cmd_get_displayname

    cmd_is_enabled
    cmd_is_checked

    cmd_exec

   Machine Command status
    is_estop_enabled
    is_stop_enabled
    is_pause_enabled
    is_start_enabled
    is_output_enabled

    is_open_enabled
    is_close_enabled

    is_code_enabled
    is_codeex_enabled

   Helpers
    open_file
    open_code

    start_file
    start_code

    test_file
    test_code

   UI
    is_visible
    show
    hide
    set_progress
    set_status

   Message
    msg
    msgerr

    msg_show

    msg_count
    msg_is_active

    msg_click_ok
    msg_click_cancel

    bubble

   Dialog
    dlg_file_open
    dlg_file_save

    dlg_new
    dlg_init
    dlg_update
    dlg_clear

    dlg_show
    dlg_run
    dlg_abort

    dlg_is_valid
    dlg_keep_open
    dlg_callback

    dlg_set_modal
    dlg_set_resizable
    dlg_set_pos
    dlg_set_size
    dlg_set_btn
    dlg_set_name
    dlg_set_color

    dlg_add_option
    dlg_add_separator
    dlg_add_image
    dlg_add_label
    dlg_add_checkbox
    dlg_add_num_input
    dlg_add_txt_input
    dlg_add_dropbox
    dlg_add_button

    dlg_comp_pos
    dlg_comp_size
    dlg_comp_color
    dlg_comp_font
    dlg_comp_name
    dlg_comp_value
    dlg_comp_callback

    dlg_draw_line
    dlg_draw_arrow
    dlg_draw_circle
    dlg_draw_rect

    dlg_click_apply
    dlg_click_ok
    dlg_click_close

    dlg_has_btn_apply
    dlg_has_btn_ok
    dlg_has_btn_close

   SW State
    is_license_valid
    is_ui_ready
    is_program_loaded
    is_controller_connected
    is_controller_ready
    is_controller_running

   HW State
    hw_isinit
    hw_serial
    hw_version
    sw_version
    hw_version_valid
    hw_sim

    hw_buffavail
    hw_buffutil

    hw_idle
    hw_estop
    hw_stop
    hw_pause

    hw_isprog
    hw_iscmd
    hw_isjog

    hw_motor
    hw_work

    hw_speed
    hw_accel

    hw_spindle
    hw_spindle_dir
    hw_spindle_idx
    hw_spindle_enc
    hw_spindle_ui

    hw_mist
    hw_flood

    hw_output
    hw_output_freq
    hw_output_duty

    hw_input
    hw_limit
    hw_jog
    hw_jogpot
    hw_ctrl
    hw_aux

   Points
    points_clear
    points_count
    points_add
    points_get
    points_set
    points_delete
    points_load
    points_save

   Image
    image_open
    image_open_data
    image_close
    image_save
    image_size
    image_get_pixel
    image_get_pixel_gray
    image_to_cam
    image_from_cam

   G-Code
    gcode_is_ready
    gcode_is_opening
    gcode_is_running
    gcode_close
    gcode_open
    gcode_load
    gcode_line_add_allowed
    gcode_line_add

   Misc
    sleep

    ready
    terminate
    send_message
    read_message

Named Pipes

sdk:python:planetcnc:msg

msg()

Displays a message using the PlanetCNC message manager.

The function converts its arguments to a string and then shows a message alert with an information icon.

Syntax

planetcnc.msg(args)

Parameters

Parameter Type Description
args tuple A tuple of one or more arguments. The arguments are converted to a single string (using their string representation) which will be displayed as the message.

Return Value

  • Total count of active messages.

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Display a message and retrieve the count.
count = planetcnc.msg("This is an informational message.", "Additional info can be added here.")
print("Message count:", count)

See also

sdk/python/planetcnc/msg.txt · Last modified: 2025/03/03 01:36 by andrej

Page Tools