Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/30/2022 in all areas

  1. The VLIDE is old school but the debugging it has is worth it. I bet it would save you some time troubleshooting.
    1 point
  2. You could also convert it here too: (setq regscale (atof (cond ((setq scl (getreal (strcat "\nEnter the scale of the new block :\nCurrent value <" regscale ">: " ) ) ) ;; Set the registry value to the variable (setenv "Point_To_Block" (vl-princ-to-string scl)) ) (regscale) ) ) ) Are you using the VLIDE to troubleshoot your problems?
    1 point
  3. Somebody get these people a calendar.
    1 point
  4. Here is something you could play with (draworder versions are the ones I supposed you are looking for...) : http://www.theswamp.org/index.php?topic=57461.0 (You'll have to be logged to theswamp.org to access...)
    1 point
  5. And at the last right label "PROFILES" you can save your setting , and as many setting as you want to . the file has ARG extension so you can set as desired.
    1 point
  6. You should have given the credit to the person who helped you with your problem as a deep manner of respect. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/my-pickbox-becomes-a-ghost-or-phantom/td-p/11066757
    1 point
  7. I edit some of that code. address calculation has some error. ex) 78 column or something This is a kind of 26 base calculation. but the column alphabet in excel is slightly different from base calculation. I didn't know that before. For example, when I think of this as a decimal number, 1 to 9 in 1,2,3,4,5,6,7,8,9,10 there is an invisible 0 in front. 01,02,03,04~10 However, since the first column alphabet is A, B, C, D... the base system cannot be calculated unless 'unknown empty alphabet' exists in front. like ?A, ?B, ?C, ?D... Also, when going from Z to AA, a second piece of evidence is added that something exists before A. If A is 0, then it must start from AA, even if A is omitted. The transition from Z to AA cannot be explained. in this case Z -> BA is correct If A is 1, there must be an alphabet before A. but in this case. transition from Z to AA is incorrect also. Z -> A? is correct. like 9 -> 10. every transition must have that unknown empty alphabet. that way is not fit to excel column. So I solve that by pushing and pulling the digit of 1 by counting as 0 column. now the calculation is correct. This problem is irrelevant if you only use columns A to Z.
    1 point
  8. Hi All, I thought it would be beneficial to everyone if I posted a LISP I wrote a while ago that saves time when drawing piping equipment. The LISP will draw various sizes of: Pipe (plan/elevation) Flange (plan/elevation) Elbow (plan/elevation) Tee (plan/elevation) All are drawn using measurements taken from the American National Standards Institute (ANSI). I hope it is of some use. PIPE & FLANGE DRAUGHTSMAN.zip
    1 point
  9. updated my code to do what you want. it will ask for a point then pop up the list. then insert that block at the point. to exit either don't pick another point or hit esc. (defun C:BlkInsert (/ c pt SS ent lst blkname) (vl-load-com) (setq c 0) (while (setq pt (getpoint "\nPick Point")) (cond ((< c 1) ;only calculate the list first time round. (setq SS (ssget "_X" '((0 . "INSERT") (410 . "Model")))) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (if (not (member (cdr (assoc 2 (setq blk (entget ent)))) lst)) (setq lst (cons (cdr (assoc 2 blk)) lst)) ) ) ) ) (setq c (1+ c)) (setq lst (vl-sort lst '<)) (setq blkname (AT:ListSelect "Block(s) in Drawing" "Pick A Block" 55 45 "false" lst)) (vl-cmdf "_.Insert" (car blkname) "_non" pt 0.0254 0.0254 0) (setq pt nil) ) (princ) ) ;; List Select Dialog (Temp DCL list box selection, based on provided list) ;; title - list box title ;; label - label for list box ;; height - height of box ;; width - width of box ;; multi - selection method ["true": multiple, "false": single] ;; lst - list of strings to place in list box ;; Alan J. Thompson, 09.23.08 / 05.17.10 (rewrite) (defun AT:ListSelect (title label height width multi lst / fn fo d f) (setq fo (open (setq fn (vl-filename-mktemp "" "" ".dcl")) "w")) (write-line (strcat "list_select : dialog { label = \"" title "\"; spacer;") fo) (write-line (strcat ": list_box { label = \"" label "\";" "key = \"lst\";") fo) (write-line (strcat "allow_accept = true; height = " (vl-princ-to-string height) ";") fo) (write-line (strcat "width = " (vl-princ-to-string width) ";") fo) (write-line (strcat "multiple_select = " multi "; } spacer; ok_cancel; }") fo) (close fo) (new_dialog "list_select" (setq d (load_dialog fn))) (start_list "lst") (mapcar (function add_list) lst) (end_list) (setq item (set_tile "lst" "0")) (action_tile "lst" "(setq item $value)") (setq f (start_dialog)) (unload_dialog d) (vl-file-delete fn) (if (= f 1) ((lambda (s / i s l) (while (setq i (vl-string-search " " s)) (setq l (cons (nth (atoi (substr s 1 i)) lst) l)) (setq s (substr s (+ 2 i))) ) (reverse (cons (nth (atoi s) lst) l)) ) item ) ) ) lol the blkname was messing me up for the longest time. it was only one item but it was in a list format so it wasn't working with insert command. (car blkname) makes a string.
    1 point
×
×
  • Create New...