Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/18/2025 in all areas

  1. @Steven P did trusted paths above including check if running Bricscad which does not have trusted paths. Another way to push lisps to a pc is you can via lisp unzip a ZIP file to a location, advantage is only one file rather than copying a whole directory. I use this as part of install lisps. Its super fast. Just need a "Filename" (startapp (strcat "powershell -command Expand-Archive -Path '" filename "' -DestinationPath 'C:/xxx-CAD-TOOLS' -FORCE")) (alert "programs unzipped to C:/xxx-CAD-TOOLS")
    3 points
  2. @GLAVCVS & @leonucadomi have a look at this it,s not code solution but rather a number of defuns to talk to Excel, read and write plus more. I keep adding functions. Alan Excel library.lsp
    2 points
  3. Just having some fun… A custom object that does triangulation and contours. Its very fast (I think) I’ve only tested on one drawing; Binaries are in the release folder here (AutoCAD 2025-2026, ZwCAD 2025-2026, GstarCAD 2026) https://github.com/CEXT-Dan/ArxTin Command: TINNER Select objects: Specify opposite corner: 41769 found Select objects: Enter a major contour interval: 100 Enter a minor contour interval: 10 CArxTinUIApp::CArxTinUIApp_tinner Done , 0.000235 seconds Command: LIST Select objects: CEXTDBTIN Layer: "tin" Space: Model space Color: BYLAYER Linetype: "Continuous" Handle = cb4cf Number of points: 41769 Number of triangles: 82720 Minimum elevation: 5503.992569 Maximum elevation: 7060.996567 2D area: 37224000.000000 3D area: 47335595.172935
    1 point
  4. Since you're not using the return for vl-directory-files (just checking if it exists), findfile will be much faster: (defun _vl-directory-files (path /) (vl-directory-files path "*.*") ) (defun _findfile (path /) (findfile path) ) Quick benchmark: _VL-DIRECTORY-FILES Elapsed: 1391 Average: 0.1391 _FINDFILE Elapsed: 484 Average: 0.0484 In any event, here's a slightly simplified mod: (defun c:SetTrustedPaths (/ ) (foreach path (list "C:\\Users\\A Folder\\LISPs\\..." ) (_SetTrustedPaths path) ) (princ) ) (defun _SetTrustedPaths (path / trustedpaths) ;; folder check (if (not (findfile path)) (vl-mkdir path)) ;; trusted path check (if (vl-string-search (strcase path) (strcase (setq trustedpaths (getvar 'trustedpaths))) ) trustedpaths (setvar 'trustedpaths (strcat (if (= 59 (last (vl-string->list trustedpaths))) trustedpaths (strcat trustedpaths ";") ) path ) ) ) ) Cheers
    1 point
×
×
  • Create New...