600,838 active members*
3,425 visitors online*
Register for free
Login
Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2023
    Posts
    1

    Smile paramètre box dialogue

    Hello,

    I have a checkbox that modifies my parameter file. Is it possible for it to check the saved value upon opening, rather than the default value?

    (print,Start spindle CW)

    (dlgname,'PARAMETRE palpeur Z',w=400, h=300, bok=1, bcancel=1)
    (dlg,'réglage palpeur et delais amorcage ', typ=label, color=0xff0000)
    (dlg,'"active axe z "|"activer~"|"desactiver~"', typ=checkbox, param=_activerz, 0, store)

    (dlg,'hauteurcapteur', typ=input, param=_hauteurpalpeur, def=-18, store, min=-50, max=+50, dec=1, setunits)
    (dlg,'hauteur de coupe', typ=input, param=_hauteurdecoupe, def=4, store, min=-100, max=+100, dec=1, setunits)
    (dlg,'hauteur amorcage coupe', typ=input, param=_hauteuramorcage, def=4, store, min=-100, max=+100, dec=1, setunits)
    (dlg,'delais amorcage', typ=input, param=_delaiscoupe, def=4, store, min=-100, max=+100, dec=1, setunits)

    (dlgshow)

  2. #2
    Join Date
    Dec 2024
    Posts
    0

    Re: paramètre box dialogue

    Hi,

    "(dlg,'hauteurcapteur', typ=input, param=_hauteurpalpeur, def=-18, store, min=-50, max=+50, dec=1, setunits)"
    The def=-18 is the value shown when you open the window. to see an older saved value you must write def=#<_hauteurpalpeur>.
    To keep this value unchanged when you restart the software, go to
    C:\ProgramFiles\PlanetCNC\Profiles\default\Paramet ers.txt
    and add the line “_hauteurpalpeur -18” at the bottom.
    This way it starts with -18 and as soon as you change it in the checkbox, the number changes here too and remains saved.
    I hope it helps

  3. #3
    Join Date
    May 2024
    Posts
    0

    Re: paramètre box dialogue

    Perfect, I'll test it tomorrow. I know how to change the values in the parameters file, but I couldn't get the new values upon restarting. Thank you for your help.

  4. #4
    Join Date
    May 2024
    Posts
    0

    Re: paramètre box dialogue

    (print,Start spindle CW)

    (dlgname,'PARAMETRE palpeur Z',w=400, h=300, bok=1, bcancel=1)
    (dlg,'réglage palpeur et delais amorcage ', typ=label, color=0xff0000)
    (dlg,'^/PlanetCNC.png', typ=image)

    (dlg,'Hauteur capteur z', typ=input, param=_hauteurpalpeur, def=#<_hauteurpalpeur>, store, min=-50, max=+50, dec=1, setunits)
    (dlg,'hauteur amorçage', typ=input, param=_hauteuramorcage, def=#<_hauteuramorcage>, store, min=-100, max=+100, dec=1, setunits)
    (dlg,'delais activation', typ=input, param=_delaisamorcage, def=#<_delaisamorcage>, store, min=-50, max=+50, dec=1, setunits)
    (dlg,'hauteur coupe', typ=input, param=_hauteurdecoupe, def=#<_hauteurdecoupe>, store, min=-100, max=+100, dec=1, setunits)
    (dlg,'delais av coupe', typ=input, param=_delaiscoupe, def=#<_delaiscoupe>, store, min=-100, max=+100, dec=1, setunits)




    (dlgshow)
    Do you have a setting for my text to truncate it because it is not complete? Then, I tried to add an image, but it was impossible with the following setting.
    (dlg,'^Icons/IMG_GoToXY.svg', typ=image)

    thanks you

  5. #5
    Join Date
    Mar 2017
    Posts
    1390

    Re: paramètre box dialogue

    Parameters can can also became persistent with function "param_persistent"
    https://cnc.zone/expr/functions/func-param_persistent

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •