Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/23/2022 in all areas

  1. I would like to make a lisp that orders me the selected objects, in various ways: I'll give an example with numbers, but they could be polylines or any other object. 1 2 3 4 5 6 7 8 9 I would like to be able to select them with "Windows" and give them e.g. the Left-Right and top-down mode (as you read a text): 1 2 3 4 5 6 7 8 9 but also other ways e.g. from bottom to top and from right to left: 9 6 3 8 5 2 7 4 1 or from top to bottom and from left to right: 1 4 7 2 5 8 3 6 9 I Attached the lisp that I did and that runs only from left to right and from top to bottom... but I think you can find solutions faster than mine! My lisp is not complete: LISTA1 output contains the coordinates of the element + the selection set... a I just have to do SSADD to complete the command and create selection set final. SelSort.lsp ORDINE.lsp
    1 point
  2. I think you hit it on the head... Seems likes its working as it should. Thank you for pointing that out. @Steven P, that is an interesting way. Not bad.
    1 point
  3. Standards will depend on the country you live in, the discipline you are working in, and the company you are working for.
    1 point
  4. Maybe this as an alternative can be made into more input lines. Multi GETVALS.lsp (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Enter sheet values " "Sheet number " 5 4 "1" "Of " 5 4 "x")))
    1 point
  5. You could create Customized MultiLine Styles to do this, including colors and spacings. Placed on a custom Pallete. It looks like marko_ribar has pulled up some of his beautiful lisps to help you get back on the tracks.
    1 point
  6. I wrote a water main program and does almost what you want it asks for a offset then you pick lines and it follows you can jump gaps etc You would need to add the start end join to a block bit but that is easy. Need a dwg to look at, are the yellow lines or plines or combo of both ? There is a couple of methods using bpoly that would speed up the offset part but again a dwg would help.
    1 point
  7. No shortage of links to browse... Which I guess is the PROBLEM. https://www.nationalcadstandard.org/ This YouTube video is almost an hour long, looks like the place to start to me. https://www.youtube.com/watch?v=5-DrHhWROxU Good luck with it.
    1 point
  8. @rcb007 You could also set EXPERT to 2 or higher before saving to suppress the prompt.
    1 point
  9. There should be no problem IMHO with vla-xxx functions... (vla-saveas (vla-get-activedocument (vlax-get-acad-object)) (strcat (getvar 'dwgprefix) (if (getvar 'dwgtitled) (getvar 'dwgname) "Drawingname"))) Though untested...
    1 point
  10. Try the following: (defun c:lpr ( / e g p q ) (while (not (progn (setvar 'errno 0) (setq e (entsel)) (cond ( (= 7 (getvar 'errno)) (prompt "\nMissed, try again.") ) ( (null e)) ( (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getclosestpointto e)) (prompt "\nInvalid object selected.") ) ( (setq e (car e)) (while (= 5 (car (setq g (grread t 13 0)))) (redraw) (if (setq q (vlax-curve-getclosestpointto e (trans (cadr g) 1 0) t)) (grdraw (cadr g) (trans q 0 1) 1) ) ) (if (= 3 (car g)) (progn (entmake (list '(0 . "LINE") (cons 10 (setq p (trans (cadr g) 1 0))) (cons 11 (setq q (vlax-curve-getclosestpointto e (trans (cadr g) 1 0) t))) ) ) (princ "\nLine endpoints: ") (princ p) (princ " | ") (princ q) (princ "\nLength: ") (princ (distance p q)) ) t ) ) ) ) ) ) (redraw) (princ) )
    1 point
×
×
  • Create New...