Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/2022 in all areas

  1. Something like this (setq obj (vlax-ename->vla-object (entlast))) (setq cpt (osnap (vlax-curve-getStartPoint obj) "gcen")) Thanks to Kent Cooper for the hint about gcen
    1 point
  2. No wonder, because you are having the tag name ORDER and the drawing attached from the OP has different tag name.
    1 point
  3. @Tharwat hi and sorry for the late reply. PERFECT - THANKS!! your code solved me a long standing issue. regards, aridzv.
    1 point
  4. A similar approach to set or reset Vars (setq vars (list '("insunits" 6) '("Insunitsdefsource" 6) '("INSUNITSDEFTARGET" 6)'("lunits" 2)'("luprec" 3)'("aunits" 1) )) (foreach var vars (setvar (car var)(cadr var)) ) You can add the existing setting in the list (setq vars (list '("insunits" 6 (getvar 'insunits)) '("Insunitsdefsource" 6 (getvar Insunitsdefsource)) '("INSUNITSDEFTARGET" 6 (getvar 'INSUNITSDEFTARGET)) '("lunits" 2 (getvar 'lunits))'("luprec" 3 (getvar 'luprec))'("aunits" 1 (getvar 'aunits)) )) So at end rest back to original. (setvar (car var)(caddr var))
    1 point
  5. 1 point
  6. Helping others does not mean 'a play' to me if that's your opinion , so if you are after that program then come and pay for it and I will make it for you unless you are like that guy who is messing up with all threads for the sake of number of posts. Don't be panic from my frankness because I can't say other than what I believe.
    1 point
  7. As I said you are not following, the member who asked for number incrementing codes is different that the OP and they have different tag name as they already claimed that in their earlier replies.
    1 point
  8. I have no problem to help any one asks me as long as I have the time besides the willing. Follow the thread before you criticize and blame the others.
    1 point
  9. Incrementing by number is much more simpler than letters so try the following mods and let me know. (defun c:IncAtt (/ int sel ent get lst fun opr tmp pre key) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (and (or (initget "X Y") (setq key (getkword "\nSpecify direction of attributed blocks to increment alphabatically [ X / Y ] : " ) ) ) (setq pre (getint "\nEnter The Numbering Starting Value :")) (princ "\nSelect Attributed blocks with ORDER attribute to increment : ") (setq int -1 sel (ssget "_:L" '((0 . "INSERT") (66 . 1))) ) (while (setq int (1+ int) ent (ssname sel int) ) (setq get (entget ent) lst (cons (list (cdr (assoc 10 get)) ent) lst) ) ) (if (= key "X") (setq fun car opr < ) (setq fun cadr opr > ) ) (mapcar (function (lambda (obj) (setq obj (cadr obj)) (while (/= (cdr (assoc 0 (setq get (entget (setq obj (entnext obj))))) ) "SEQEND" ) (if (= (cdr (assoc 2 get)) "ORDER") (and (entmod (subst (cons 1 (itoa pre)) (assoc 1 get) get)) (setq pre (1+ pre)) ) ) ) ) ) (vl-sort lst (function (lambda (j k) (opr (fun (car j)) (fun (car k))))) ) ) ) (princ) ) (vl-load-com)
    1 point
  10. Thank you so very much GP_ and Gu_xl for sharing a fantastic program. Sorry my "thanks" are 10 years late but I didn't see this the first time around. Truly great programming! I have already added to my toolbox.
    1 point
×
×
  • Create New...