Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/05/2020 in all areas

  1. just a quicky (before my boss finds out) ; choose from list (defun cfl (l / f p d r) (and (setq p (open (setq f (vl-filename-mktemp ".dcl")) "w")) (princ "cfl:dialog{label=\"Choose\";:list_box{key=\"lb\";}ok_cancel;}" p) (not (setq p (close p)))(< 0 (setq d (load_dialog f)))(new_dialog "cfl" d) (progn (start_list "lb")(mapcar 'add_list l)(end_list) (action_tile "lb" "(setq r (nth (atoi $value) l))(done_dialog 1)") (action_tile "accept" "(setq r (get_tile \"lb\"))(done_dialog 1)") (action_tile "cancel" "(setq r nil)(done_dialog 0)") (start_dialog)(unload_dialog d)(vl-file-delete f) ) ) (cond ((= r "") nil)(r r)(t nil)) ) (defun c:t1 ( / lay-list) (setq lay-list '("layer1" "layer2" "layer3")) (if (setq inp (cfl lay-list)) (alert (strcat "You selected " inp))(alert "You cancelled")) (princ) )
    2 points
  2. I use design center and Insert>Layout>Layout from Template (easiest to right-click a Layout tab>From Template). No need for a LISP, but I am sure someone can come up with one.
    1 point
  3. 1 point
  4. RemoveItems requires an array of AcadEntity elements. Even if there has to be only one element in it. So you must add something like what follows: Dim Ent(0) As AcadEntity ' this you can add at the beginning of your code toghether wit other Dim statements Set Ent(0) = rawTxt 'this line must be added before the following one ss.RemoveItems Ent ' this line you already have in your code
    1 point
×
×
  • Create New...