Jump to content

line type scale slider


einstainas

Recommended Posts

hi guys, i would like change global linetype scale by using slider.

i know that its posible create dialog box by using vlisp or smth like that.

Link to comment
Share on other sites

hi guys, i would like change global linetype scale by using slider.

i know that its posible create dialog box by using vlisp or smth like that.

 

Here is quick example change to suit

 

;;slide_ltype.lsp
(defun c:lts (/ dcl_id )
 (setq dcl_id (load_dialog "slide_ltype.dcl"))
 (new_dialog "begun" dcl_id)
 (set_tile "dia" "") 
 (set_tile "beg" "1")
 (setq const (get_tile "txt"))
 (action_tile "beg" (strcat
        "(progn "
        "(setq val $value)"
        "(set_tile \"txt\" val)))"         
        )

   )
 (action_tile "accept" "(done_dialog)(setq hit T)")
 (action_tile "cancel" "(done_dialog)(setq hit nil)")
 (setq result (start_dialog))
 (unload_dialog dcl_id)
 (alert (strcat "Percents selected: " val))
 (princ)
)

 

;;slide_ltype.dcl
begun : dialog {
 key = "dia";
 label = "";
 spacer;
 : row {
     : edit_box {label = "Selected value:";
     key = "txt";
     value = "";
     edit_width = 8;
     }
 }
 : row {
   height = 1.97;
   : text_part {
     key = "empty";
     label = "";
   }
   : slider {
     key = "beg";
     min_value = 0;
     max_value = 100;
     small_increment = 1;
     big_increment = 2;
     width = 42;
     fixed_width = true;
     is_tab_stop = false;
   }
 }
 ok_cancel;
}

 

~'J'~

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...