Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/27/2024 in all areas

  1. Based on what your drawing shows. I recommend that you look at this program from Lee Mac: https://www.lee-mac.com/objectbreak.html At the top of the program file, you can set the layer properties of the changed portions of the objects.
    1 point
  2. If the user has to provide the points, can't you just use the PLine command? Or call it with the AutoLISP command command? What am I missing?
    1 point
  3. @Noor-Cad Give this a try. It will maintain the differing Z vales of your text. (defun c:foo (/ ln o p pl s txt) ;; RJP » 2024-06-24 (cond ((setq s (ssget ":L" '((0 . "*TEXT,LWPOLYLINE")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (if (= "AcDbPolyline" (vla-get-objectname (setq o (vlax-ename->vla-object e)))) (setq pl o) (setq txt (cons (list o (vlax-get o 'textalignmentpoint)) txt)) ) ) (if pl (foreach tx txt (setq ln (entmakex (list '(0 . "LINE") (cons 10 (cadr tx)) (cons 11 (mapcar '+ (cadr tx) '(0 1 0))) '(8 . "TEMPLINE") ) ) ) (vla-put-elevation pl (last (cadr tx))) (if (setq p (vlax-invoke (vlax-ename->vla-object ln) 'intersectwith pl 3)) (progn (vlax-put (car tx) 'textalignmentpoint p) (entdel ln)) ) ) ) ) ) (princ) )
    1 point
  4. Two other ways (command "LINE" p1 (mapcar '+ p1 (list 0.0 BM 0.0))) ; (list x y 0.0) (command "LINE" p1 (polar p1 (/ pi 2.) bm))
    1 point
  5. This does the same: (vl-filename-base (getvar 'dwgname))
    1 point
  6. A quick freebie stops the dwgname.dxf.dxf (setq dwgname (getvar 'dwgname)) (setq len (strlen dwgname)) (setq dwgname (substr dwgname 1 (- len 4)))
    1 point
  7. Have dug out a short lisp and altered to suit. This will save the current drawing (whole drawing) as a dxf file in the current drawings directory. It doesn't alter the preferences so a normal save will still be in the set format. (defun c:asdxf ( / c_doc) (setq c_doc (vla-get-activedocument (vlax-get-acad-object))) (vla-saveas c_doc (vlax-get-property c_doc 'fullname) ac2007_dxf) (princ "Drawing saved in 2007_dxf Format") );end_defun
    1 point
×
×
  • Create New...