Jump to content


Trusted Members
  • Content count

  • Joined

  • Last visited

Community Reputation

10 Good

About Tharwat

  • Rank
    CAD Guru

Personal Information

  • Location
    Great Syria , Living in Abu Dhabi
  • Interests
    AutoLISP Programming

My Work

  • Occupation
    MEP AutoCAD Draughtsman
  • Discipline
  • Discipline details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.

My Software

  • Main CAD Product
  • Current Product Version
  • First AutoCAD Version
    AutoCAD 2002
  1. Tharwat

    BIG NEWS: We're upgrading

    Sorry, I have been a permanent contributor in CADTutor for almost ten years now and this is the first time I feel that I am uncomfortable due to this new design or software although that I witnessed many forums around with new designs but this one is not to me. The website seems like a blog than a professional website that I used to enjoy my time with for years now ! and the AutoLISP forum is almost fully blanked with white color and without knowing which thread that I have already participated with unless I concentrate so deeply where that small star icon lays on the left side hand. To be fair, the reply window is the best with the new updates / software but I also noticed is that the code tags window is with cyan background colour.! Sorry for this disappointing view but I am a big fan of this website so please take my opinion as an encouragement for better changes. Thanks.
  2. Tharwat

    BIG NEWS: We're upgrading

    Apparently the signature links are not included into the new updates / design, besides that the members that are online in the same forum can't be seen anymore.
  3. Much simpler. (itoa (fix elevation))
  4. Hi, Try this function. (defun set:distance (blk dis) (vl-some '(lambda (x) (and (eq "Distance1" (vla-get-propertyname x)) (vlax-put x 'Value dis)) ) (vlax-invoke (vlax-ename->vla-object blk) 'getdynamicBlockproperties) ) ) (vl-load-com) Usage of above function: (set:distance <BlockEntityName> <DistanceValue>)
  5. If you would like to hire someone to write this program for you, just contact me.
  6. (list (assoc 8 ed) (assoc 62 ed)) Are enough.
  7. Right click on the table then export to Excel.
  8. Hi, Try this. (defun c:Test ( / int sel ent ) (and (setq int -1 sel (ssget "_:L" '((0 . "*TEXT") (-4 . "/=") (50 . 0.0)))) (while (setq ent (ssname sel (setq int (1+ int)))) (entmod (append (entget ent) '((50 . 0.0)))) ) ) (princ) )
  9. Tharwat

    Change Text Color

    Hi, My attempt. (defun c:foo (/ str int sel ent get lst) (and (setq str "" lst '(("0.09" 252) ("0.49" 5) ("0.99" 3)) ;; add your more desired of strings with colours here int -1 sel (ssget "_X" (list '(0 . "TEXT") (cons 1 (apply 'strcat (mapcar '(lambda (u) (setq str (strcat (car u) ","))) lst ) ) ) ) ) ) (while (setq ent (ssname sel (setq int (1+ int)))) (entmod (append (setq get (entget ent)) (list (cons 62 (cadr (assoc (cdr (assoc 1 get)) lst)))) ) ) ) ) (princ) )
  10. You're welcome and good luck with your coding.
  11. Hi, You can use my function below to separate a string with delimiter. (defun _peelstring (string del / str pos lst) ;; Tharwat - 03.Mar.2015 ;; (while (setq pos (vl-string-search del string 0)) (setq str (substr string 1 pos) string (substr string (+ pos (1+ (strlen del)))) ) (and str (/= str "") (setq lst (cons str lst))) ) (and string (/= string "") (setq lst (cons string lst))) (reverse lst) ) usage f the above function: _$ (_PEELSTRING "Layer1,Color,Ltype,LineWeight" ",") ("Layer1" "Color" "Ltype" "LineWeight")