Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/19/2018 in all areas

  1. Hello, I am interested in a LISP able to make overlapping sheets as layouts following a road alignment and overlap a fraction. Each sheet will have its own UCS or view orientation. You can see it from these videos: anyone knows one? Best regards, Daniel
    1 point
  2. Hy Emmanuel Delay, I bend in front of you, the code works fine ... a good day and I want and thanks for your help
    1 point
  3. ;; total length by linetype (defun total_length ( ss linetype / i enttype ltp ent total) (setq i 0 total 0.0 ) (repeat (sslength ss) (setq ent (ssname ss i)) ;; make sure it's a line or polyline (setq enttype (cdr (assoc 0 (entget ent)))) (if (or (= enttype "LWPOLYLINE") (= enttype "POLYLINE") (= enttype "LINE")) (progn ;; see if the line type corresponds (setq ltp (cdr (assoc 6 (entget ent)))) (if (= linetype ltp) (progn (setq total (+ total (vla-get-length (vlax-ename->vla-object ent)))) )) )) (setq i (+ i 1)) ) total ) (defun hatch_surface ( ss color ptrn / i total) (setq i 0 total 0.0 ) (repeat (sslength ss) (setq ent (ssname ss i)) ;; make sure it's a hatch (setq enttype (cdr (assoc 0 (entget ent)))) (if (= enttype "HATCH") (progn ;; by color (if (/= color nil) (progn (if (= color (cdr (assoc 62 (entget ent))) ) (setq total (+ total (vla-get-area (vlax-ename->vla-object ent)))) ) )) ;; by pattern (if ptrn (progn (if (= ptrn (cdr (assoc 2 (entget ent))) ) (setq total (+ total (vla-get-area (vlax-ename->vla-object ent)))) ) )) )) (setq i (+ i 1)) ) total ) (defun blocks_by_name (ss blkname / total i ent) (setq i 0 total 0 ) (repeat (sslength ss) (setq ent (ssname ss i)) (if (and (= "INSERT" (cdr (assoc 0 (entget ent)))) (= blkname (cdr (assoc 2 (entget ent)))) ) (setq total (+ total 1)) ) (setq i (+ i 1)) ) total ) (defun c:TL ( / ss) (vl-load-com) ;; all entities (setq ss (ssget "_X") ) (princ "\nFENCELINE1: ") (princ (total_length ss "FENCELINE1")) (princ "\nFENCELINE2: ") (princ (total_length ss "FENCELINE2")) (princ "\nGAS_LINE: ") (princ (total_length ss "GAS_LINE")) (princ "\nHOT_WATER_SUPPLY: ") (princ (total_length ss "HOT_WATER_SUPPLY")) (princ "\nHatch color 152: ") (princ (hatch_surface ss 152 nil)) (princ "\nHatch color 30: ") (princ (hatch_surface ss 30 nil)) (princ "\nHatch pattern HEX: ") (princ (hatch_surface ss nil "HEX")) (princ "\nHatch pattern ANSI31: ") (princ (hatch_surface ss nil "ANSI31")) (princ "\nHatch pattern SOLID: ") (princ (hatch_surface ss nil "SOLID")) (princ "\nBlocks oooo: ") (princ (blocks_by_name ss "oooo")) (princ "\nBlocks bbbb: ") (princ (blocks_by_name ss "bbbb")) (princ) )
    1 point
  4. Attached is revised lisp to allow polyline selections via selection set. plb2.lsp
    1 point
  5. I'll sort the selection set. Re the parallel polyline, send me a drawing showing the condition and i'll let you know.
    1 point
  6. @JuniorNogueira You're welcome. Please check that it works correctly for all cases. It can be easily adapted to use a selection set if required.
    1 point
  7. There is a new stable release of FreeCAD (0.17) and 0.18 development is well on it's way. If you feel like you need a break from AutoCAD & it's family it's waiting for testers, opinions, suggestions and bug reports. Linux flavours, Win and OSX are supported. Also "no installation needed" versions are available. [1] https://github.com/FreeCAD/FreeCAD/releases
    1 point
×
×
  • Create New...