Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/04/2021 in all areas

  1. Glad you got it sorted. FWIW, you should localize your variables in you code like so: (defun c:elptlw ( / ELEMENTO_N ENT LISTA_ENT MARGEN_ERROR NUEVALISTA_PT OBJ PT)
    1 point
  2. Never can have good enough Searchfoo Skills but is will take a little time to do this. I am looking for something that is cost effective (including the free programs) Something for the individual user that is not going to make a profit. Thank you,
    1 point
  3. Sorry for not getting back to you sooner. That is what I was going for and I think I figured it out. (defun c:sav (/ cpy sub) (setq sub (strcat "ExportToAutoCAD-" (substr (rtos (getvar "CDATE") 2 0) 1))) (cond ((zerop (getvar 'dwgtitled)) (princ "\nCurrent drawing is unsaved.") ) ((not (or (findfile (setq sub (strcat (getvar 'dwgprefix) sub))) (vl-mkdir sub))) (princ (strcat "\nUnable to create directory " sub)) ) ((progn (princ "\nSaving current drawing...") (command "_.qsave") (setq cpy (strcat sub "\\" (substr (rtos (getvar "CDATE") 2 0) 1) "-ACAD-" (getvar 'dwgname))) (if (findfile cpy) (vl-cmdf "_.-exporttoautocad" "_F" "2010" "" cpy "_Y") (vl-cmdf "_.-exporttoautocad" "_F" "2010" "" cpy) ) ) ) (princ (strcat "\nUnable to expot drawing to: " cpy)) ) ((princ (strcat "\nDrawing exported to: " cpy))) (princ) ) Thank you again for all your help!!!
    1 point
  4. Suppose this is your geometry: When you're done, use the AUTOCONSTRAINT command (or optionally go here). Go to Settings first, check the Coincident, Parallel, Tangent and Concentric while leaving the rest unchecked: Click OK and select the whole red and white curves and enter. Now you can move the white lines and the red ones will follow.
    1 point
  5. No worries it is very smart. Would it be easier to just have some create new, erase and recreate lisp. Something like this with your shapes.
    1 point
  6. You want the sub folder to be? ExportToCAD - YYYYMMDD and the file to be YYMMDD_ dwgname
    1 point
  7. You can try this to remove duplicate vertices. Probably won't work on polylines that have bulges and did not fix the error in your sample drawing when creating the region. (defun c:foo (/ a f o p r s) ;; RJP » 2021-08-02 ;; Remove duplicate polyline vertexes (cond ((setq s (ssget ":L" '((0 . "LWPOLYLINE")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq p (vlax-get (setq o (vlax-ename->vla-object e)) 'coordinates) r nil f nil ) (while (cadr p) (setq r (cons (setq a (mapcar '+ p '(0 0))) r) p (cddr p) ) (while (equal a (mapcar '+ p '(0 0)) 1e-8) (setq f (setq p (cddr p))) (print "Duplicate Vertex Removed") ) ) (and f (vlax-put o 'coordinates (apply 'append (reverse r)))) ) ) ) (princ) )
    1 point
×
×
  • Create New...