Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/13/2022 in all areas

  1. @ tuantrinhdp please try this way I dare to modify MHUPP lisp . the text size default to actual TEXTSIZE I change GETINT , for precision, as it shall be an Integer and setq osmode to 0 And use -boundary , with no options ;;----------------------------------------------------------------------------;; ;; Adds Area text (defun C:Adds-Area-text (/ A AREA B H LL MAXPT MINPT MPT OSMODE PT TEXTSIZE UR X ) (vl-load-com) (setq textsize (getvar 'textsize)) (if (not(setq h (getreal "\nText Height: "))) (setq h textsize) ) (setq x (getint "\n Prescision")) (setq osmode (getvar 'osmode)) (setvar 'osmode 0) (while (setq pt (getpoint "\nPick Area: ")) ;(vl-cmdf "_.-Boundary" "A" "I" "No" "X" "_non" PT "") (vl-cmdf "_.-Boundary" PT "") (setq a (entlast)) (setq b (vlax-ename->vla-object a)) (vla-put-closed b :vlax-true) (setq area (rtos (vla-get-area b) 2 x)) (vla-getboundingbox b 'minpt 'maxpt) (setq LL (vlax-safearray->list minpt) UR (vlax-safearray->list maxpt) MPT (mapcar '/ (mapcar '+ LL UR) '(2 2 2)) ) (entmake (list (cons 0 "TEXT") (cons 10 MPT) (cons 11 MPT) (cons 40 h) (cons 1 area) (cons 71 0) (cons 72 1) (cons 73 2) ) ) (entdel a) );end while (setvar 'osmode osmode) (princ) ) ;|«Visual LISP© Format Options» (100 2 1 2 T " " 100 6 0 0 1 nil T nil T) ;*** DO NOT add text below the comment! ***|; adds-area-text.lsp to put text at center area.dwg
    2 points
  2. You have the correct scale. 24 is a named scale and is probably the closest to 1/8"=1'-0 or 0.0104167 Use command SCALELISTEDIT.
    2 points
  3. Very Strongest Protected lisp code funny result (eq "DD:13:EF:3D:95:AC" ret) ;; This is your Pc MAC (eq "BFEBFBFF040908EA" serx) ;; This is your Processor Id Licence.lsp
    1 point
  4. Thank you, but i tried lisp didn't dislay a text into the center of the area. error: "Cannot invoke (command) from *error* without prior call to (*push-error-using-command*)" - with different drawing. and "bad argument type: fixnump: 2.0" ( when i input Precision)
    1 point
  5. Should be what you are looking for. please only click in fully enclosed areas. Will ask you for text size and precision then ask to pick an area. it will input a text into the center of the area. if your picking inside weird shapes it could be outside. might have to rework the boundary command seems to be a bit different in BricsCAD. ;;----------------------------------------------------------------------------;; ;; Adds Area text (defun C:FOO (/ h x obj area LL UR MPT) (vl-load-com) (if (not (setq h (getreal (strcat "\nText Height ["(rtos (getvar 'textsize) 2 (getvar 'luprec))"]: ")))) (setq h (getvar 'textsize)) ) (setq x (getint "\n Prescision: ")) (while (setq pt (getpoint "\nPick Area: ")) (vl-cmdf "_.-Boundary" "A" "I" "No" "X" "_non" PT "") (setq obj (vlax-ename->vla-object (entlast))) (setq area (rtos (vla-get-area obj) 2 x)) (setq MPT (osnap (vlax-curve-getStartPoint obj) "gcen")) (entmake (list (cons 0 "TEXT") (cons 10 MPT) (cons 11 MPT) (cons 40 h) (cons 1 area) (cons 71 0) (cons 72 1) (cons 73 2) ) ) (vla-delete obj) ) (princ) )
    1 point
  6. Don't have express tools loaded right now. But this should do what you want. Burst blocks with attributes and explode blocks that don't. Until their aren't any blocks left. If burst isn't loaded it would loop forever so added a if statement to check for burst command. ;;----------------------------------------------------------------------------;; ;; Explode all Blocks in drawing (defun C:EB (/ SS) (vl-load-com) (if (vl-symbol-value 'C:Burst) ;test for burst command (while (setq SS (ssget "_X" '((0 . "INSERT") (410 . "Model")))) (foreach e (mapcar 'cadr (ssnamex SS)) (if (assoc 66 (entget e)) (vl-cmdf "_.Burst" e "") (progn (vla-explode (setq blk (vlax-ename->vla-object e))) (vla-delete blk) ) ) ) ) (prompt "\nPlease Load Burst Command before running \"EB\" Command") ) (princ) )
    1 point
  7. That is DIMEXO system variable. The default is 1/2 the text and arrow size. Manual drafting days it was kept between 1/32" and 1/16", basically clearly not touching the object, but close enough to be clear where it's going.
    1 point
×
×
  • Create New...