Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/21/2023 in all areas

  1. I have figured out how to stop the point size changing. It was set to change the pdsize to 0.15, so updated to 25 and all good now. ) (setq vars '(cmdecho attdia attreq pdsize INSUNITS) ;list of variables vals (mapcar 'getvar vars) ;store old values ) (mapcar 'setvar vars '(0 0 1 0.15 0)) ;set new values
    1 point
  2. Try this: replace (don't forget the ') '(470 . "ANSI31") by (cons 470 (getvar "HPNAME"))
    1 point
  3. You may also want to add (command "._layer" "_U" layname "") before deleting the entities. If the layer is locked, it won't work. Just my $0.02
    1 point
  4. It's seems working. Many thanks!
    1 point
  5. No website, just YouTube, his email and LinkedIn. Most comments on the videos are where to get the program and no answer.
    1 point
  6. Thank you for your efforts and interest.
    1 point
  7. 1 point
  8. Post a dwg for Q2. Need say a block with attribute. Turn certain layers on/off is the VPLAYER command, or are you talking about zooming to a certain spot in Model then setting the layout MVIEW to a scale based on that point.
    1 point
  9. Another way using vla-zoomwindow: (defun c:plga (/ a ao b n n1 pl ss) (if (setq ss (ssget "_X" '((0 . "*POLYLINE") (-4 . "<NOT") (-4 . "&") (70 . 128) (-4 . "NOT>")))) (progn (setq ao (vlax-get-acad-object)) (repeat (setq n (sslength ss)) (setq pl (vlax-ename->vla-object (setq n1 (ssname ss (setq n (1- n)))))) (if (and (= (logand (cdr (assoc 70 (tblsearch "layer" (vla-get-layer pl)))) 4) 0) (/= (vla-get-objectname pl) "AcDb3dPolyline") ) (progn (vla-getboundingbox pl 'a 'b) (vla-zoomwindow ao a b) (vlax-put pl 'linetypegeneration -1) ) ) ) ) ) (princ) )
    1 point
  10. This code is a simple way to do it, but unless you have a really big drawing it will go so fast that you won't get to enjoy it unless you put in a delay. Edit: Added in the delay function, then used (vla-ZoomWindow) method and a then a (redraw), and set the delay to about 200 msec. (defun pjk-delay (sec / elsp dt secs) (setq dt (getvar "DATE") secs (* 86400.0 (- dt (fix dt)))) (while dt (setq dt (getvar "DATE") elsp (* 86400.0 (- dt (fix dt)))) (if (or (< (- elsp secs) 0.0)(>= (- elsp secs) sec))(setq dt nil)) ) (princ) ) ;; End Function (pjk-delay) (defun c:plga (/ a b ao ss n n1 pl) (setq ao (vlax-get-acad-object)) (if (setq ss (ssget "_X" '((0 . "*POLYLINE") (-4 . "<NOT") (-4 . "&") (70 . 128) (-4 . "NOT>")))) (repeat (setq n (sslength ss)) (setq pl (vlax-ename->vla-object (setq n1 (ssname ss (setq n (1- n)))))); added variable "n1" to get ename. (if (and (= (logand (cdr (assoc 70 (tblsearch "layer" (vla-get-Layer pl)))) 4) 0) (/= (vla-get-ObjectName pl) "AcDb3dPolyline")) (Progn (redraw) (vla-getboundingbox pl 'a 'b) (vla-zoomwindow ao a b) (redraw) (vlax-put pl 'LinetypeGeneration -1) (pjk-delay 0.2) ) ) ) ) (princ) )
    1 point
  11. Not tested, but it should be something like this : (defun c:dellaysbyprefix ( / lay lays prefix ) (while (setq lay (tblnext "LAYER" (not lay))) (setq lays (cons (cdr (assoc 2 lay)) lays)) ) (setq prefix (strcase (getstring "\nSpecify prefix of layers to remove from DWG : "))) (foreach lay lays (if (wcmatch (strcase lay) (strcat prefix "*")) (progn (vl-cmdf "_.LAYDEL" lay) (while (< 0 (getvar (quote cmdactive))) (vl-cmdf "") ) ) ) ) (princ) ) HTH. M.R.
    1 point
  12. I want file lisp copy object by object reference. BV.dwg
    -1 points
×
×
  • Create New...