Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/02/2021 in all areas

  1. In Word can use ^p to replace end of line so can do 2 replaces one for (" and second " "0")^p but must save as text file and Word can do funny stuff leaving hidden characters. When i do this copy and paste to notepad to make sure. I use notepad++ and it appears to support \n as end of line but could not get sequence quite right will keep trying, I will try their forum etc. If you want it as lisp code to make a list need '("tetxt1" "0")
    1 point
  2. Something like this? (defun c:demo (/ file file1 fname fname1 l) (if (and (setq fname (getfiled "Select the Text file" (getvar 'dwgprefix) "txt" 0)) (setq file (open fname "r")) (setq fname1 (getfiled "New Text File" (strcat (substr fname 1 (- (strlen fname) 4)) "-NEW") "txt" 1)) (setq file1 (open fname1 "w")) ) (progn (while (setq l (read-line file)) (write-line (strcat "(\"" l "\" \"0\")") file1) ) (close file) (close file1) ) ) (princ) ) I hope this helps. Henrique
    1 point
  3. Difficult can look into a wipeout under your object ie send to back, circle not supported by wipeout so use a ploygon withs lots of sides. Another way is the use of a "keyhole" for the shape of the viewport so the under has a hole in it. The horizontal line is like 0.00001 offset with a trim at the circle and edge, so a closed pline.
    1 point
  4. Hello @zwonko i make some lisp. Start with "tt" and first time will ask you for precision and Height if you want to change use command "prec" (defun c:tt (/ elev dim grad mspace pt Mtext answ) (defun c:prec () (setq prec (getint "\nSet precison: ")) (setq H (getreal "\nSet text height: ")) ) (if prec (princ) (c:prec)) (if H (princ) (c:prec)) (setq ele (car (entsel "\nSelect first elevation: "))) (if (equal (vlax-get (vlax-ename->vla-object ele)'ObjectName) "AcDbMText") (progn (command "explode" ele) (setq elev (vlax-get (vlax-ename->vla-object (entlast))'TextString )) (command "undo" "1") ) (progn (setq elev (vlax-get (vlax-ename->vla-object ele)'TextString )) ) ) (setq dim (/ (vlax-get (vlax-ename->vla-object (car (entsel "\nSelect dimension: "))) 'Measurement) 100)) (setq grad (/ (atof (vl-string-right-trim "%" (vlax-get (vlax-ename->vla-object (car (entsel "\nSelect grade: "))) 'TextString))) 100)) (setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object) ) ) ) (initget "+ -") (setq answ (getkword "\nChose [+/-]<+> ")) (setq pt (getpoint "\nWhere to place the new elevation: ")) (setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object) ) ) ) (setq Mtext (vla-AddMText mspace (vlax-3d-point pt) H (strcat "%<\\AcExpr ((" elev answ (rtos dim 2 prec) "*" (rtos grad 2 prec) ")) \\f \"%lu2%pr" (rtos prec 2 0)"\">%"))) (vlax-put-property (vlax-ename->vla-object (entlast)) 'Height H) (princ) )
    1 point
  5. Something like this, but with circle?
    1 point
×
×
  • Create New...