Jump to content

Leaderboard

Popular Content

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

  1. This might be what you're looking for: Quick Mirror
    3 points
  2. Ok , got it . A new one . (defun C:test () (setq ss (ssget "_:S" '((0 . "LWPOLYLINE")))) (setq point (last (last(car (ssnamex ss))))) )
    1 point
  3. (defun C:test () (setq ss (ssget "_:S" '((0 . "LWPOLYLINE")))) (ssnamex ss) ) http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-6933.htm
    1 point
  4. This should do it. (setq obj (vlax-ename->vla-object (car (entsel "\nSelect Line : "))) len (rtos (LM:roundm (vlax-get-property obj 'length) 5) 2 0) ) ;; Round Multiple - Lee Mac ;; Rounds 'n' to the nearest multiple of 'm' (defun LM:roundm ( n m ) (* m (fix ((if (minusp n) - +) (/ n (float m)) 0.5))) ) --edit I'm getting nil for pt if your calculating midpoint try this. (setq pt (mapcar '/ (mapcar '+ (vlax-get obj 'startpoint) (vlax-get obj 'endpoint)) '(2 2)))
    1 point
  5. 1 point
  6. I just rewrote the whole thing and made it much simpler and without a field. (defun c:ll (/ ss tStr) (vl-load-com) (setvar 'Cmdecho 0) (setq SS (car (entsel "\nSelect item to label: ")) tStr (cdr (assoc 8 (entget SS))) oLayer (getvar 'clayer) );setq (if (tblsearch "layer" "c_gen_Text") (command "_layer" "s" "c_gen_Text" "c" "50" "" "lt" "continuous" "" "") (command "_layer" "m" "c_gen_Text" "c" "50" "" "lt" "continuous" "" "") );if (vl-cmdf "_.mleader" pause pause tStr) (setvar 'clayer olayer) (setvar 'Cmdecho 1) (princ) )
    1 point
  7. That's due to While function and it does not stop right after the last vertice. It would be much better to use your certain Mleader style then you know the number of vertices required to ask the user to specify in prior of setting the field value to it, otherwise it would be much professional way to get the number of vertices that the current mleader style uses then you modify your codes and use something like repeat ( based on the number of vertices ) then finally set the text string < field > .
    1 point
  8. You need to convert the entity selected 'ss' to vla-object. (vla-get-ObjectId (vlax-ename->vla-object SS)) Besides that, you don't the tablesearch expression that assigned to variable 'sss'
    1 point
×
×
  • Create New...