Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/27/2020 in all areas

  1. Please upload your sample.dwg where you want to apply such lisp
    1 point
  2. Hello Tharwat, that is really spectacular, congratulations again on a job very well done. It is sort of hypnotic watching it work. I don't know when I might have occasion to use it in my work, but I will definitely download it and look forward to a time when I might have use of it. Thanks very much and keep up the great work.
    1 point
  3. @BIGAL (vlax-property-available-p vlaobj 'Area) is a stronger check, so that it would work on all object that you selected having the "Area" property.
    1 point
  4. Here is the updated version of the same program to release: 1.2.0. https://autolispprograms.wordpress.com/fire-fighting-grooved-and-threaded/
    1 point
  5. A 1st step You can add the area after d (vlax-curve Need to add a check is the property area obtainable for the object, as a Line has no area so use a IF (if (= "AcDbLine" (vla-get-objectname)) (setq area 0.0) (setq area (vla-get-area (vlax-ename->vla-object ent))) ) 2nd Step need to probably do a check of layer name in list and do totals writing to table when layer name changes. Lastly a google should find what you want its a common request.
    1 point
  6. Customization
    1 point
  7. Yes ! There are a few ways around the problem write to file, save as enviroment put it in your script (setq val1 22) after open dwg2 use blackboard
    1 point
  8. (defun c:ubv1 ( / ) (vl-load-com) (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object) ) "UBV n BlockName " ) (princ) )
    1 point
  9. Here, try this from my library... (defun c:CHIV ( / osm ss e f ed edd eddd eddd1 eddd2 eddd3 newed p m n i ) (vl-load-com) (setq osm (getvar 'osmode)) (setvar 'osmode 1) (prompt "\nPick closed 2d polyline with or without arcs") (setq ss (ssget "_+.:E:S:L" '((0 . "*POLYLINE") (-4 . "<or") (70 . 1) (70 . 129) (-4 . "or>")))) (if ss (setq e (ssname ss 0)) (progn (setvar 'osmode osm) (alert "Picked wrong entity... Please pick normal closed 2d polyline next time-quitting...") (exit) ) ) (if (eq (cdr (assoc 0 (entget e))) "POLYLINE") (progn (setq f t) (command "_.convertpoly" "_l" e "") ) ) (setq ed (entget e)) (setq edd nil) (foreach ec ed (if (not (or (eq (car ec) 10) (eq (car ec) 40) (eq (car ec) 41) (eq (car ec) 42) (eq (car ec) 91) (eq (car ec) 210)) ) (setq edd (cons ec edd)) ) ) (setq edd (reverse edd)) (setq eddd nil) (setq eddd1 nil) (setq eddd2 nil) (setq eddd (member (assoc 10 ed) ed)) (setq p (getpoint "\nPick vertex you want to become initial")) (setq m (vlax-curve-getparamatpoint e (vlax-curve-getclosestpointto e p))) (if (assoc 91 ed) (setq n (* m 5)) (setq n (* m 4))) (setq i 0) (foreach ec eddd (progn (setq i (+ i 1)) (if (<= i n) (setq eddd1 (cons ec eddd1)) ) (if (> i n) (setq eddd2 (cons ec eddd2)) ) ) ) (setq eddd1 (reverse eddd1)) (setq eddd3 (list (assoc 210 eddd2))) (setq eddd2 (cdr eddd2)) (setq eddd2 (reverse eddd2)) (setq newed (append edd eddd2 eddd1 eddd3)) (entmod newed) (entupd e) (setvar 'osmode osm) (if f (command "_.convertpoly" "_h" e "") ) (alert "After CHIV, run PEDIT->Edit Vertex to see change") (princ) ) HTH, M.R. [EDIT : Newer version here : https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-all-lines-and-trace-them-all/m-p/11329901/highlight/true#M434369 ]
    1 point
×
×
  • Create New...