Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Interesting Bricscad using "Fence" option. No code needed.
  3. BIGAL

    An Open-source TIN entity

    Looks good, next option would be "Add breaklines" to make the TIN take into account edges.
  4. Today
  5. Consider this link with multiple solutions https://www.theswamp.org/index.php?topic=53993.0
  6. SLW210

    Ladder orientation

    What version of AutoCAD Electrical? Unless it's changed, you go to Drawing Properties under the Drawing Format tab and select "Vertical" under Ladder Defaults. Maybe this will help... AutoCAD Electrical 2025 Help | To Work With Ladders | Autodesk
  7. Sorry BigAl, I was forgetting BricsCAD - I've never used it so no sure what it has and doesn't
  8. Thanks, that works better
  9. I spoke too fast
  10. Mountain_XD

    How to Extend Lines to shape 2D Polyline

    I agree with you but what if there are a lot of polylines and lines?
  11. check your 'projmode if 'extend too' entity is on a different 'Z' I like [2]
  12. You don't need a lisp for that. just the extend command.
  13. Danielm103

    An Open-source TIN entity

    Oh, explode will create polylines and faces
  14. Danielm103

    An Open-source TIN entity

    There’s a sample point drawing on github TIN, Major and Minor and have transparency, but they are currently hard coded to TIN 50%, Minor 50%, Major %100
  15. 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
  16. Please help me Extend Lines to Polyline. Thanks so much ! Extend Lines to Polyline.dwg
  17. @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")
  18. Yesterday
  19. BIGAL

    ATTDEF COUNT...help

    @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
  20. leonucadomi

    ATTDEF COUNT...help

    It can also be a csv file Here I have an example code that, while calculating, generates a file like the one I told you about. (setq fn (getfiled "Fichero de punto a exportar" "" "csv" 1)) (setq Archivo (open fn "w")) (setq var0 "Puntos") (setq var1 "Angulos") (setq var2 "Distancias") (princ (strcat var0 "," var1 "," var2) Archivo) (princ "\n" Archivo) (setq n 0)
  21. leonucadomi

    ATTDEF COUNT...help

    thank you master
  22. GLAVCVS

    ATTDEF COUNT...help

    Excel and I barely know each other. I don't feel as prepared as some to talk about him
  23. GLAVCVS

    ATTDEF COUNT...help

    ;BACALADODEBILBADOO.noes (defun nqf (tuSS / i lista tipObj cad) (princ "\nNumero que falta") (terpri) (setq cant (sslength tuSS)) (princ "\nCantidad de textos seleccionados = ") (princ cant) (princ "\nLista de numeros faltantes") ;Pasar del SS a una lista de valores (setq i 0) (repeat (sslength tuSS) (setq tipObj (cdr (assoc 0 (setq le (entget (ssname tuSS i))))) num (atoi (cdr (assoc (if (= tipObj "TEXT") 1 2) le))) i (1+ i) lista (if (setq l (assoc num lista)) (subst (list num (1+ (cadr l))) l lista) (append lista (list (list num 1))) ) ) ) ;Imprimir los valores que no aparezcan (terpri) (setq i 1) (princ (strcat "\nLista de numeros existentes\n" (while lista (if (setq v (assoc i lista)) (setq cad (if (= (cadr v) 1) (if cad (strcat cad ", " (itoa (car v))) (itoa (car v)) ) (if cad (strcat cad ", " (itoa (car v)) "(" (itoa (cadr v)) ")") (strcat (itoa (car v)) "(" (itoa (cadr v)) ")") ) ) lista (vl-remove v lista) ) (princ (strcat "\nFalta el # " (itoa i))) ) (setq i (1+ i)) cad ) ) ) (princ) ) (defun c:nqf nil (nqf (ssget '((0 . "TEXT,ATTDEF")))))
  24. leonucadomi

    ATTDEF COUNT...help

    It's excellent, thank you I just think there is a mistake When the first number has more than one repetition, it is not counted. Could it be possible to export a file xls with two columns of values, its tag and its quantity?
  25. 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
  26. My mind was working on this last night... This should add a folder location to the users trusted locations - a few little checks along the way - then LISPs should just run (defun c:trustedpaths ( / MyDir) (setq MyDir "C:\\Users\\A Folder\\LISPs") ;; path to add ;; Can do MyDir as a list and a foreach to call (trustedpaths) (trustedpaths MyDir) ) (defun trustedpaths (MyDir / MyTrustedPaths) (setq MyTrustedPaths (getvar 'trustedpaths)) ;;get current trusted paths (if (vl-directory-files MyDir "*.*") ;;Does MyDir location exist. If not create it (princ (strcat MyDir " Folder exists.\n")) ;;Yes (progn (princ (vl-mkdir MyDir)) ;;No: Create folder (princ " Folder created.\n") ) ) (if (vl-string-search (strcase MyDir) (strcase MyTrustedPaths)) ;;Is MyDir in TrustedPaths (progn (princ (strcat MyDir " is a trusted Path.\n")) ;;Yes ) (progn ;; No: add to trusted paths (if (equal (substr MyTrustedPaths (- (strlen MyTrustedPaths) 0) ) ";") ;; Edit for trailing ; (setq MyTrustedPaths (strcat MyTrustedPaths " " MyDir)) (setq MyTrustedPaths (strcat MyTrustedPaths "; " MyDir)) ;; include ; ) (setvar 'trustedpaths MyTrustedPaths) ;; update trustedpaths system variable ) ) (princ (strcat "Trusted paths: " (getvar 'trustedpaths))) (princ) )
  27. GLAVCVS

    ATTDEF COUNT...help

    Try ;BACALADODEBILBADO.noes (defun nqf (tuSS / i lista tipObj cad) (princ "\nNumero que falta") (terpri) (setq cant (sslength tuSS)) (princ "\nCantidad de textos seleccionados = ") (princ cant) (princ "\nLista de numeros faltantes") ;Pasar del SS a una lista de valores (setq i 0) (repeat (sslength tuSS) (setq tipObj (cdr (assoc 0 (setq le (entget (ssname tuSS i))))) num (atoi (cdr (assoc (if (= tipObj "TEXT") 1 2) le))) i (1+ i) lista (if (setq l (assoc num lista)) (subst (list num (1+ (cadr l))) l lista) (append lista (list (list num 1))) ) ) ) ;Imprimir los valores que no aparezcan (terpri) (setq i 1) (princ (strcat "\nLista de numeros existentes\n" (while lista (if (setq v (assoc i lista)) (setq cad (if (= (cadr v) 1) (if cad (strcat cad ", " (itoa (car v))) (itoa (car v)) ) (if cad (strcat cad ", " (itoa (car v)) "(" (itoa (cadr v)) ")") (itoa (car v)) ) ) lista (vl-remove v lista) ) (princ (strcat "\nFalta el # " (itoa i))) ) (setq i (1+ i)) cad ) ) ) (princ) ) (defun c:nqf nil (nqf (ssget '((0 . "TEXT,ATTDEF")))))
  28. bustr

    Ladder orientation

    Autodesk seems to go out of their way to match the difficulty of intools, lotus notes and IFP-PRO. Can anyone tell me why my ladder is horizontal (There was no option in the dialog box for orientation.), why it has more rungs than specified, why there are no busses and why there is an "X" at the end. Autodesk's forums are useless so I don't expect to get an answer from them.
  1. Load more activity
×
×
  • Create New...