Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/16/2019 in all areas

  1. How are you making the xline in the 1st place if 2 points then calculate a direction dummy point that is based on the offset value + or -. You imply the direction via the two pick points.
    1 point
  2. This should work ;; settings (setq alz_digits 2) ;; number of digits ;; substring, like php substr ;; Just because I don't like (substr) enough (defun substring ( str idx len ) (substr str (if (< idx 0) (+ 1 (strlen str) idx) (1+ idx)) len) ) (defun alze (val delim digits / pos rest num numlength) ;; example: (vl-string-position (ascii "z") "azbzlmnqc" nil T) (setq pos (vl-string-position (ascii delim) val nil T)) ;; the last "-" is on this string position (setq rest (substring val 0 (+ pos 1))) ;; the rest of the string, including the last - (setq num (substring val (+ pos 1) (strlen val))) ;; the number. I don't really care if it's a number, I'll just add a zero if the string length is < digits (repeat (- digits (strlen num)) (setq num (strcat "0" num)) ;; add zeroes to num as long as num has fewer characters as digits ) (strcat rest num) ;; now stick rest back to num ) ;; Add Leading Zero End (defun c:alze ( / ss i elm val newval) (setq ss (ssget '((0 . "*TEXT")))) (setq i 0) (repeat (sslength ss) (setq elm (ssname ss i)) ;; text value (setq val (cdr (assoc 1 (entget elm)))) ;; (setq newval (alze val "-" alz_digits)) (entmod (subst (cons 1 newval) (cons 1 val) (entget elm))) (setq i (+ i 1)) ) (princ) )
    1 point
  3. You can use my existing Quick Field program for this task, defining a custom command such as: (defun c:tcopy ( ) (LM:quickfield "Textstring" "" 1))
    1 point
  4. Thank you Roy_043 ! (vla-SetGridDoubleLineSpacing TabObj 0 -1 (+ acHorzBottom acHorzTop acVertLeft acVertRight) 5) (vla-setgridlinestyle TabObj 0 -1 (+ acHorzBottom acHorzTop acVertLeft acVertRight) acgridlinestyledouble)
    1 point
  5. (vla-setgridlinestyle (vlax-ename->vla-object (car (entsel))) 0 0 achorzbottom acgridlinestyledouble)
    1 point
  6. For the property & formatting code shown in your image, you would need to use: (defun c:test ( ) (LM:QuickField "TextString" "%tc1" 1)) However, since the program doesn't allow you to select nested objects (such as attributes) by default, you will also need to change line 248 from: (list 'if '(setq ent (LM:SelectIfHasProp prop entsel)) to: (list 'if '(setq ent (LM:SelectIfHasProp prop [color=red]n[/color]entsel))
    1 point
×
×
  • Create New...