Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/16/2019 in all areas

  1. As Tharwat eluded to: (defun c:bl nil (setvar 'cecolor "ByLayer")) (defun c:bk nil (setvar 'cecolor "ByBlock"))
    1 point
  2. Just a slight technical note. Osmode of 199 would give Endpoint, Midpoint, Centre, Insertion, Perpendicular. If you wanted Intersection instead of Insertion, Osmode would be 167.
    1 point
  3. What I use: (defun c:bys nil (mapcar 'setvar '(CECOLOR CELTYPE CELWEIGHT) '("BYLAYER" "BYLAYER" -1)) (vl-cmdf "_.regen") (princ) ) (vl-load-com)
    1 point
  4. Perhaps you didn't make a mistake. I noticed an error once I posted the lisp and edited. You may have copied the unedited lisp while I was editing it.
    1 point
  5. FWIW, vl-filename-base should still perform as expected even if the filename in question contains periods, observe: _$ (vl-filename-base "179062-0000018159-Fa. Martin.dwg") "179062-0000018159-Fa. Martin" Hence the code could be written: (defun c:todo ( / d f ) (if (or (findfile (setq f (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) ".txt"))) (and (setq d (open f "w")) (not (close d))) ) (startapp "write" (strcat "\"" f "\"")) ) (princ) )
    1 point
×
×
  • Create New...