Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/2023 in all areas

  1. When you run cad it creates a lot of temporary files, these being saved in a directory that you can reset. The type of files are SV$ BAK DWL DCL and so on. You may be horrified how much stuff is in there. You will find the files by Options, Files, Temporary prefix (Bricscad) similar Acad. When running dcl's if you crash program a lot of ~00123.dcl will be created. So this will identify how many files you have, dont tick the boxes on, go have a look at the location. Move/copy anything you think you need else tick the file type box and they will be removed. ; clean up temp directory.. (defun cleanuptemp ( / files1 files2 files3 files4 files5 files6 files7 lst7 x val ans) (setq *files* (vla-get-files (vla-get-preferences (vlax-get-Acad-object)))) (setq pre (vla-get-TempFilePath *files*)) (alert (strcat "Your temp directory is " pre)) (setq lst7 '()) (setq files1 (vl-directory-files pre "*.BAK")) (if (= files1 nil) (setq lst7 (cons "0 BAK's " lst7)) (setq lst7 (cons (strcat (rtos (length files1) 2 0) " BAK's ") lst7)) ) (setq files2 (vl-directory-files pre "*.sv$")) (if (= files2 nil) (setq lst7 (cons "0 SV$'s " lst7)) (setq lst7 (cons (strcat (rtos (length files2) 2 0) " SV$'s " ) lst7)) ) (setq files3 (vl-directory-files pre "*.dwl*")) (if (= files3 nil) (setq lst7 (cons "0 DWL's " lst7)) (setq lst7 (cons (strcat (rtos (length files3) 2 0) " DWL's ") lst7)) ) (setq files4 (vl-directory-files pre "*.AC$")) (if (= files4 nil) (setq lst7 (cons "0 ac$'s " lst7)) (setq lst7 (cons (strcat (rtos (length files4) 2 0) " AC$'s " ) lst7)) ) (setq files5 (vl-directory-files pre "*.log")) (if (= files5 nil) (setq lst7 (cons "0 Logfile's" lst7)) (setq lst7 (cons (strcat (rtos (length files5) 2 0) " Logfile's ") lst7)) ) (setq files6 (vl-directory-files pre "~*.dcl")) (if (= files6 nil) (setq lst7 (cons "0 Temp DCL's " lst7)) (setq lst7 (cons (strcat (rtos (length files6) 2 0)" Temp DCL's " ) lst7)) ) (setq files7 (vl-directory-files pre "*.dmp")) (if (= files7 nil) (setq lst7 (cons "0 DMP's " lst7)) (setq lst7 (cons (strcat (rtos (length files7) 2 0)" DMP's " ) lst7)) ) (setq lst7 (reverse lst7)) (if (not AH:Toggs)(load "Multiple toggles.lsp")) (setq lst7 (cons "Pick to delete " lst7)) (setq ans (reverse (ah:toggs lst7))) (setq x 1) (foreach val ans (if (= val "1") (progn (foreach filename (eval (read (strcat "files" (rtos x 2 0)))) (vl-file-delete (strcat pre filename)) (princ (strcat "\n" filename)) ) ) ) (setq x (1+ x)) ) (princ) ) (cleanuptemp) Multi toggles.lsp
    3 points
  2. I believe the backslash has to be double or one forward slash instead.
    2 points
  3. I made this a long long time ago , before I new about Shell.Application etc. Not the prettiest by today's standards but it got the job done for me at that time. getfolder.lsp GetFolder.DCL
    2 points
  4. @Steven P FWIW deleting AC$ from the temp folder may have a negative effect on XREF demand loading if working remotely ( like through a VPN ). Having the local copy greatly effects how fast XREF's are loaded. Some variables to reference XLOADPATH, DEMANDLOAD, XLOADCTL
    1 point
  5. Nice and easy. I only had 3 files, I keep mine cleaned out.
    1 point
  6. I am very happy to know that the code worked correctly for you and that it managed to fulfill the purpose you needed. I appreciate your words and I am glad that I could be of help.
    1 point
  7. Using getfiled maybe. (setq filename (getfiled "Select the File " "" "dwg" 16)) You can remove dwg name from filename so get path to that directory. There is a post some where about what does not work, I think it was over at forums autodesk. getapplication think Excel lisp linking No load MNL As mentioned Acet functions This got me to the LT 2024 help page and developer help. https://help.autodesk.com/view/ACDLT/2024/ENU/?guid=GUID-86C522B8-9D44-43F5-B1E7-FC4BECAEBDCE Found this comment by Lee-mac Unfortunately many of my programs will not be compatible with AutoCAD LT, as the LISP API in LT does not support interfacing with ActiveX objects outside of the AutoCAD Object Model.
    1 point
  8. Says its a valid function. Might need to follow this format to work properly. (acet-ui-pickdir [message [startDir [caption]]]) -Edit Never Mind https://help.autodesk.com/view/ACDLT/2024/ENU/?guid=GUID-16E9081D-1447-4D37-8636-E7D39F3127EA
    1 point
  9. No codes needed, just use the native command name: QDIM then selected the target curve objects.
    1 point
  10. Guys, thanks everyone for your response. Romero, your code works properly. It alerts me when I click but does the job I need anyway. Thank you so much, you helped me a lot, Good luck.
    1 point
  11. I wouldn't recommend using subst for this purpose, as subst will replace all occurrences within the list - consider the following example: _$ (setq brgZ '(10 10 10)) (10 10 10) _$ (subst (1+ (cadr brgZ)) (cadr brgZ) brgZ) (11 11 11) Instead, I would use simple list construction - (setq brgZ (list (car brgZ) (1+ (cadr brgZ)) (caddr brgZ))) Alternatively, you could use mapcar, but this somewhat obscures the intent: (setq brgZ (mapcar '+ brgZ '(0 1 0)))
    1 point
  12. haha, I was wondering if anyone would pick up on my StarWars quote! Thanks SO MUCH for all the detailed assistance! I'm at work right now, but I will be diving into all your instructions when I get home tonight. I'll be in touch!!!
    1 point
  13. Drawing the POB line. Orthomode should still be disabled (off). Start the Line command. Pick the endpoint of the reference line. Let go of the mouse. For the next point type, at the command line, @113.66<N5d27'23"W (see image in next post). Assuming the line is there how do we verify the length and distance? Answer: we use the List command (one of a couple of options). Type List at the command line then press Enter. When asked to select object pick the line that was just drawn. Press Enter. A text window should appear listing all the information about the line. Check that the length and angle are correct.
    1 point
×
×
  • Create New...