Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/24/2024 in all areas

  1. Try DwgSearch | AutoCAD | Autodesk App Store
    1 point
  2. Do a zoom all - it makes little difference zoom object or zoom all so long as the outline is visible. In reality I'll do zoom all and then zoom 0.95 (zoom out a little more) just in case.
    1 point
  3. I think it was MHUPP who put me onto the following 2 snippets, save the current zoom with ZoomCurrent, and return to it with ZoomSaved can be used to show all the outline and return the screen to how the user had it at the start of the LISP: Example 3 lines at the end to show it working ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun ZoomCurrent ( / vc sz ) ;; record the current zoom (setq vc (getvar 'viewctr)) (setq sz (getvar 'viewsize)) (list vc sz) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun ZoomSaved ( vcsz / ) ;; zoom to zoom. car: centre coordinate, cadr scale factor (command "Zoom" "c" (car vcsz) (cadr vcsz)) (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;Zoom operation (setq vcsz (ZoomCurrent)) (command "zoom" "object" pause) (ZoomSaved vcsz)
    1 point
  4. Yes, you are right! (defun c:pp() (setq pl (car (entsel "select border polyline\n")) points (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget pl))) ) (strcat (itoa (1- (sslength (ssget "cp" points)))) " entities found") ) This will subtract one before it displays the result... but: What if there are two (or more) identical border polylines one on the top of the other(s)? The program will count them all but it will subtract only one from the result! Maybe you will wish to use WP instead of CP in the SSGET. That way the program will count only the entities inside the borders. And an other limitation coming up in my mind: the border polyline must contain no arcs, just straight segments. This Lisp will ignore the bulge factors.
    1 point
  5. (defun c:spl2pl ( / ss i ent ss3 ss2 obj cpcount j ) (princ "\n Select spline to convert to pline : ") (setq ss (ssget '((0 . "SPLINE")))) (setq i 0) (setq ss3 (ssadd)) (repeat (sslength ss) (setq ent (ssname ss i)) (command "_explode" ent "") (setq ss2 (ssget "_P")) (setq j 0) (repeat (sslength ss2) (setq ent2 (ssname ss2 j)) (setq obj (vlax-ename->vla-object ent2)) (setq cpcount (vlax-get-property obj 'Numberofcontrolpoints)) (command "_SPLINEDIT" ent2 "_P" cpcount "") (ssadd (entlast) ss3) (setq j (+ j 1)) ) (setq i (+ i 1)) ) (if (> (sslength ss3) 1) (progn (command "_pedit" "_M" ss3 "" "J" "0" "") ) (progn (command "_pedit" ss3 "") ) ) (princ) ) 1. Roughly, i think this is not you want 2. use wmf zoom > object wmfout wmfin explode it you get 2dpolyline automatically, > scale it and convert 3. save as drawing or wblock spline to oldest .dxf version as you can, ex) R12 and then reopen it. it changed to 3dpolyline explode it and then mpedit join them all
    1 point
×
×
  • Create New...