Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/18/2020 in all areas

  1. Well I can agree to that statement, mostly. While in college my roommate bought a new Pentium 60 MHz PC and I bought a new 486DX4 100 MHz PC. There were tasks that mine seemed faster and some optimized for the Pentium that his was faster with. We both had 16 mb of ram and 540 mb hard drives. LOL, I paid $1,500 for that with a 15" CRT screen.
    1 point
  2. Thanks Dlanorh rising star. its fulfill my requirements perfectly. Thanks again
    1 point
  3. Try this. Not Ideal but works. (defun rh:sammlung_n (o_lst grp / tmp n_lst) (cond ( (and o_lst (zerop (rem (length o_lst) (float grp)))) (while o_lst (repeat grp (setq tmp (cons (car o_lst) tmp) o_lst (cdr o_lst))) (setq n_lst (cons (reverse tmp) n_lst) tmp nil) );end_while ) ( (not (zerop (rem (length o_lst) (float grp)))) (princ "\nModulus Error : The passed list length is not exactly divisible by the group size!!")) );end_cond (if n_lst (reverse n_lst) nil) );end_defun rh:sammlung_n (defun rh:2chge (dist acc / frp pfx str) (setq frp (rem dist 1000) pfx (fix (/ dist 1000)) ) (cond ( (= pfx 0) (setq pfx "00+")) ( (< 0 pfx 10) (setq pfx (strcat "0" (itoa pfx) "+"))) (t (setq pfx (strcat (itoa pfx) "+"))) ) (cond ( (= 0.0 frp) (setq frp "000")) ( (< 0.0 frp 10.0) (setq frp (strcat "00" (rtos frp 2 acc)))) ( (< 10.0 frp 100.0) (setq frp (strcat "0" (rtos frp 2 acc)))) (t (setq frp (rtos frp 2 acc))) ) (setq str (strcat "CH: " pfx frp " "));; adjust last blank text to shift text position left or right );end_defun (defun rh:223 (lst z / a) (setq a (reverse (cons z (reverse lst))))) (defun rh:line (spt ept) (entmakex (list '(0 . "LINE") (cons 10 spt) (cons 11 ept) (cons 8 "tick")))) (defun rh:text (ipt ht str ang) (entmakex (list '(0 . "TEXT") (cons 10 ipt) (cons 40 ht) (cons 8 "ch text") (cons 1 str) (cons 50 ang) (cons 11 ipt) '(72 . 2) '(73 . 2) ) ) ) (defun c:pvch ( / ss cnt ent typ v_lst dst txt ang tent tang tpt) (prompt "\nSelect Polylines") (setq ss (ssget '((0 . "*POLYLINE")))) (cond (ss (repeat (setq cnt (sslength ss)) (setq ent (ssname ss (setq cnt (1- cnt))) typ (cdr (assoc 70 (entget ent))) );end_setq (if (>= typ 128) (setq typ (- typ 128))) (cond ( (> typ 4) (setq v_lst (rh:sammlung_n (vlax-get (vlax-ename->vla-object ent) 'coordinates) 3))) (t (setq v_lst (rh:sammlung_n (vlax-get (vlax-ename->vla-object ent) 'coordinates) 2))) );end_cond (foreach pt v_lst (setq dst (vlax-curve-getdistatpoint ent pt) txt (rh:2chge dst 3) ang (angle '(0.0 0.0 0.0) (vlax-curve-getfirstderiv ent (vlax-curve-getparamatpoint ent pt))) );end_setq (rh:line (polar pt (+ ang (* pi 0.5)) 0.1) (polar pt (- ang (* pi 0.5)) 0.1)) (if (< (setq tang (- ang (* pi 0.5))) 0.0) (setq tang (+ tang pi))) (setq tent (rh:text pt (getvar 'textsize) txt tang)) (if (= (length pt) 2) (setq pt (rh:223 pt 0.0))) (if (< (* pi 0.5) tang (* pi 1.5)) (vlax-invoke (vlax-ename->vla-object tent) 'rotate pt pi)) );end_repeat );end_repeat ) );end_cond (princ) );end_defun
    1 point
  4. Sir this is way better than the previous one! i love it!. its making our productivity faster. thank you so much!
    1 point
  5. Start with Chainage.lsp there are a few out there.
    1 point
  6. I think this works (vl-load-com) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; draw Mtext (defun M-Text (pt str ht ang) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 40 ht) (cons 50 ang) (cons 1 str))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; correct - extend if needed (setq conversionData '( ("10A" 17.3) ("15A" 21.7) ("20A" 27.2) ("25A" 34) ("32A" 47.7) ("40A" 48.6) ("50A" 60.5) ("65A" 76.3) ("80A" 89.1) ("90A" 101.6) ("100A" 114.3) ("125A" 139.8) ("150A" 165.2) ("175A" 190.7) ("200A" 216.3) ("225A" 241.8) ("250A" 267.4) ("300A" 318.5) ("350A" 355.6) ("400A" 406.4) ) ) (defun isAppox (s d / tol) (setq tol 0.2) ;; I'll take a tolerance of 0.2, to be sure (< (abs (- s d)) tol ) ) (defun size2code (s / res) (setq i 0) (setq res nil) (foreach a conversionData (if (isAppox s (nth 1 a)) (setq res (nth 0 a)) ) ) res ) (defun c:maa ( / ht ov oh ent s code line ip e ang ip2 tmp) ;; settings (setq ht 75.0) ;; Text height of Mtext (setq ov 100.0) (setq oh 24.0) ;; Select DIM and find code (setq ent (car (entsel "\nSelect DIM: "))) (setq s (cdr (assoc 42 (entget ent)))) (setq code (size2code s)) ;; Select line (setq line (car (entsel "\nSelect line: "))) (setq ip (cdr (assoc 10 (entget line)))) (setq e (cdr (assoc 11 (entget line)))) ;; in case start and endpoint are drawn reversed, let's swap them (if (< (nth 0 e) (nth 0 ip)) (progn (setq tmp ip) (setq ip e) (setq e tmp) )) (setq ang (angle ip e)) ;; Insertpoint of the Mtext. We will put it slightly to the right of the i.P. of the line (setq ip2 (polar ip (+ ang (/ pi 2)) ov)) (setq ip2 (polar ip2 ang oh)) ;; draw Mtext (M-Text ip2 code ht ang) (princ) )
    1 point
  7. Beware the AutoCAD GeoLocation command. If you take a drawing on arbitrary coordinates and use AutoCAD's Pick Location function, picking a point in your drawing, you are setting yourself up for a world of problems, such as never being able to properly merge other data that is correctly georeferenced. Yes, the Bing images may line up, yes the lat/long reported may be approximately correct, but drawings in arbitrary/assumed coordinates will lead to problems including embarrassment if you provide them to surveyors, engineers or GIS professionals. Others agree, take a look at this Autodesk forum post.
    1 point
×
×
  • Create New...