Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. OVERKILL should remove the duplicate vertices.
  3. Today
  4. This tool will be perfect when complemented by another tool that detects this MTEXT and loads the files it refers to. This means that the command name must be the same as the file name. This idea needs to be further developed. It's very interesting.
  5. @GLAVCVS ¡Muchísimas gracias! Thanks a lot! The last code works great! I get a list of used programs. Special thanks for "Nikon's doubts". Now it's the end of my doubts. ¡Buena suerte en nuevos proyectos!
  6. Yesterday
  7. Hi all I have many Closed 3dpolyline Triangles with 4 vertices each. Would it be possible with the help of lisp command to track all triangles and remove duplicates, please? Its the first and second vertices with same position. Thank you
  8. Final edit to prevent the dialog from asking unnecessary questions. Remember: the LISP commands it will remember will be those that have been executed at some point. (defun fota (/ arch cad cmd mens) (defun pregunta (a b / cad) (cond ((= (car b) "CLOSE") (if (and *lstCmds* (setq mens (cmdsCargados)) (= (vlax-invoke-method (vlax-create-object "wscript.shell") 'popup "Print commands on screen?" 0 "Nikon's doubts" 4) 6) ) (vla-AddMText (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-3d-point (getpoint "\nInsertion point...")) 100 mens) ) ) ((= (type a) 'VLR-Lisp-Reactor) (if (not (member (setq cad (substr (car b) 4 (- (strlen (car b)) 4))) *lstCmds*)) (setq *lstCmds* (cons (substr (car b) 4 (- (strlen (car b)) 4)) *lstCmds*)) ) ) ) ) (foreach sim (atoms-family 0) (if (wcmatch (setq cmd (strcase (vl-princ-to-string sim) T)) "c:*") (setq *afI* (cons sim *afI*)) ) ) (setq *r* (vlr-command-reactor nil '((:vlr-commandwillStart . pregunta)))) (setq *r1* (vlr-lisp-reactor nil '((:vlr-lispwillstart . pregunta)))) ) (defun cmdsCargados (/ cad) (setq *cadCmds* nil) (foreach sim (atoms-family 0) (if (not (member sim *afI*)) (if (and (wcmatch (setq cad (strcase (vl-princ-to-string sim) T)) "c:*") (member (strcase (substr cad 3)) *lstCmds*) ) (setq *cadCmds* (strcat (if *cadCmds* (strcat *cadCmds* "\n") "\\C1Commands loaded during last sesion:\\C256\n") (substr cad 3))) ) ) ) *cadCmds* ) (fota)
  9. Thanks for the suggestion, @Steven P I'll look into it.
  10. I think it's a good idea that I'm also going to try: leaving a text box with the names of the Lisp commands used to edit a drawing. This new code will filter all of AutoCAD's predefined Lisp commands and, of those loaded by the user, will only consider those that have been used in the drawing. To avoid confusion, replace everything above with this new one. (defun fota (/ arch cad cmd) (defun pregunta (a b / cad) (cond ((= (car b) "CLOSE") (if (and *lstCmds* (= (vlax-invoke-method (vlax-create-object "wscript.shell") 'popup "Print commands on screen?" 0 "Nikon's doubts" 4) 6)) (c:cmdsCargados)) ) ((= (type a) 'VLR-Lisp-Reactor) (if (not (member (setq cad (substr (car b) 4 (- (strlen (car b)) 4))) *lstCmds*)) (setq *lstCmds* (cons (substr (car b) 4 (- (strlen (car b)) 4)) *lstCmds*)) ) ) ) ) (foreach sim (atoms-family 0) (if (wcmatch (setq cmd (strcase (vl-princ-to-string sim) T)) "c:*") (setq *afI* (cons sim *afI*)) ) ) (setq *r* (vlr-command-reactor nil '((:vlr-commandwillStart . pregunta)))) (setq *r1* (vlr-lisp-reactor nil '((:vlr-lispwillstart . pregunta)))) ) (defun c:cmdsCargados (/ cad arch linea) (setq *cadCmds* nil) (foreach sim (atoms-family 0) (if (not (member sim *afI*)) (if (and (wcmatch (setq cad (strcase (vl-princ-to-string sim) T)) "c:*") (member (strcase (substr cad 3)) *lstCmds*) ) (setq *cadCmds* (strcat (if *cadCmds* (strcat *cadCmds* "\n") "\\C1Commands loaded during last sesion:\\C256\n") (substr cad 3))) ) ) ) (if *cadCmds* (vla-AddMText (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-3d-point (getpoint "\nInsertion point...")) 100 *cadCmds*)) (princ) ) (fota)
  11. I have about 50 lisp programs in startup. I upload the rest as needed. I have a list of autoload programs of this type (_autoload "MTxt")(c:MTxt). Many teams have pseudonyms in acad.pgp. I just want the list of used programs to remain in the drawing. Lee Mac's LISPLogV1-0.lsp program does what I need, only in a .csv file.
  12. 300 Lisp programmes... If you have the time, create this: (defun recordLISP (LispName / ) (if (= LispsList nil) ; check if list exits (progn (setq LispsList (list LispName)) ; create new list, add text string to it ) ; end progn (progn (setq LispsList (cons LispName LispsList)) ; add LispName to LispsList ) ; end progn ) ; end IF ) (defun c:MySave ( / ) (defun MakeMText (pt TxtString) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 1 TxtString) )) ; end Entmakex, End List ) ; end MakeMText (defun LM:lst->str ( lst del ) (if (cdr lst) (strcat (car lst) del (LM:lst->str (cdr lst) del)) (car lst) ) ) (MakeMText (GetPoint "Enter Insert Point") (LM:lst->str (reverse LispsList) "\\P")) ) and for every LISP you want to record add this line (recordLISP "-LISPNAME-") A little over the top maybe, but you get to control what LISPs you really want to record. For example, I have a couple of shortcuts, for example "ZA" for Zoom All, "PlotPDF" to plot a PDF - neither of these examples are a part of the process to create a drawing, where others such as "CTX+" - Copy Text, increment by 1 is, I might want to record that. If you LISP library is like mine you could probably cut 50 or so off that 300 LISPs as unnecessary to record think. I am curious what the end result you want to do is, once you have listed the commands you use, you can recreate process to create the drawing, but perhaps without also knowing mouse clicks and keyboard entries not a lot else?
    아주 좋은 프로그램입니다 저는 이프로그램의 라이센스를구입하려하는데 방법을모르겠네요 알려주세요
  13. @NikonI think there's an easier and more definitive way. Wait.
  14. I saved this code in acad2021Doc.lsp
  15. I open a new file, download, for example, 3 lisps, but when I close it, the text is saved indicating the number of programs, more than 3. In my opinion, programs that are in startup are being displayed...
  16. Once you've done this, after opening any drawing, the code will be loaded, and when you close the drawing, it should prompt you for a location point for an MTEXT with the loaded commands. The only question I have is whether it's better to save this code in acad####Doc.lsp or acad####.lsp.
  17. How to make it work? Locate your acad**doc.lsp file and copy the code at the end of the original code, but before any code you may have added yourself. Try it.
  18. This could be one way to do it: (defun fota (/ arch cad cmd) (defun pregunta (a b) (if (= (car b) "CLOSE") (if (= (vlax-invoke-method (vlax-create-object "wscript.shell") 'popup "Print commands on screen?" 0 "Nikon's doubts" 4) 6) (c:cmdsCargados)))) (foreach sim (atoms-family 0) (if (wcmatch (setq cmd (strcase (vl-princ-to-string sim) T)) "c:*") (setq *afI* (cons sim *afI*)) ) ) (setq *r* (vlr-command-reactor nil '((:vlr-commandwillStart . pregunta)))) ) (defun c:cmdsCargados (/ cad cadCmds arch linea) (foreach sim (atoms-family 0) (if (not (member sim *afI*)) (if (wcmatch (setq cad (strcase (vl-princ-to-string sim) T)) "c:*") (setq cadCmds (strcat (if cadCmds (strcat cadCmds "\n") "\\C1Commands loaded during last sesion:\\C256\n") (substr cad 3))) ) ) ) (if cadCmds (vla-AddMText (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-3d-point (getpoint "\nInsertion point...")) 100 cadCmds)) (princ) ) (fota)
  19. I often have to go back to old drawings. I have over 300 lisp programs. I would like the drawing to have a list of programs used to continue working, but over time it is not always possible to remember the name of the desired program.
  20. LISPLogV1-0.lsp is a very convenient program. Thanks @Lee Mac. Is it possible to get a list of lisp commands in the drawing? That is, when saving a drawing, a request appears: "Save a list of lisp commands?" and the text with the commands is inserted into the drawing?
  21. Lee Mac

    switch to turn on or off a variable

    Another - (defun c:sf ( ) (setvar 'ucsfollow (- 1 (getvar 'ucsfollow))) (princ) )
  22. Steven P

    Selection set filter

    Your looking at DXF code 42 - which is "Actual Measurement" If X is say 1.2345 your selection set will look for dimensions measuring 1.2345 units, not passing through X coordinate 1.2345. Modified from Glavcvs code above: (ssget "_X" (list (cons 0 "DIMENSION") ; Filter for dimension '(-4 . "=,=,*") ; List filter modifiers (list 10 X Y ) ; Dimensions: '= 10' '= X' 'Anything Y' ) ; end list ) ; end ssget List filter modifiers could also be < or > '(-4 . "=,>,*") ; List filter modifiers (list 10 10 Y ) ; Dimensions: '= 10' 'X coord > 10' 'Anything Y' Weekend, beers last night, CAD is definitely off today so no testing done to check if I am typing rubbish or not.
  23. Perhaps this old program? https://lee-mac.com/lisplog.html
  24. I assume you're referring to commands defined in Lisp code. One way to do this is to call ATOMS-FAMILY, save its contents in a variable, call ATOMS-FAMILY again when the drawing is about to be closed, compare the difference, and filter out symbols that don't begin with "c:" But why do you need to do this?
  25. Good day to everyone. Is it possible to display a list of AutoLISP commands before closing and saving the dwg file? For example, in notepad or text in dwg.
  26. GLAVCVS

    Selection set filter

    According to your original code, the dimension drawn when the command is executed isn't changed. Only the existing dimensions are. Therefore, the call to DIMORDINATE should be made at the end of the loop, like this: (defun C:or (/ dst w m x y cj e n) (prompt "\nSet UCS at 0,0") (while (setq w (getpoint "\nFirst point")) (setq m (getpoint w) x (car w) y (cadr w) n nil ) (setvar "osmode" 0) (if (> X 10) (if (setq cj (ssget "_F" (list w m) (list (cons 0 "DIMENSION")))) ;if (while (and cj (setq e (ssname cj (setq n (if n (1+ n) 0))))) (entmod (append (entget e) (list (cons 62 1)))) ) ) ) (command "_dimordinate" w M) ) ;while (setvar "osmode" 511) )
  27. I am using (command "_.BREAK" pause "_F" "0,0.3" "0,-0.3") On the pause I am selecting a vertical line that spans well past the first and second point. When I got run this command and I select the line, I get this error BREAK Select object: Specify second break point or [First point]: F Specify first break point: 0,.3 Specify second break point: 0,-.3 Command: nil It doesn't break how I expect it to. If I run this command manually as in I manually type in the first and second points, it works but as soon as I try to run that single command line, it doesn't break properly. This is eventually part of a bigger lisp routine but I am getting hung up on this. Any thoughts?
  1. Load more activity
×
×
  • Create New...