Author Topic: Dimangular w/Vertex Lisp  (Read 1714 times)

0 Members and 1 Guest are viewing this topic.

Biscuits

  • Swamp Rat
  • Posts: 502
Dimangular w/Vertex Lisp
« on: November 06, 2018, 01:55:44 PM »
I wrote the following simple routine to produce an angular dimension using Vertex (as shown).
I've been trying to reduce the number of selections required from 4 to 2.
Any ideas how to accomplish this?
Thanks for any help!

Code: [Select]
defun C:av (/)
(command "-layer" "N" "DIM" "C" "red" "DIM" "S" "DIM" "")
(command "dimangular" "" "appint" pause pause)
 (princ)
)

Tried something like this. Close but no cigar.

Code: [Select]
(defun C:av (/)

(command "-layer" "N" "DIM" "C" "red" "DIM" "S" "DIM" "")

;;;;;;;;;;;;

(setq ent (entget (car (entsel "\nPick first line: "))) ;select the first line
p1 (cdr (assoc 10 ent))
p2 (cdr (assoc 11 ent))
)
(setq ent (entget (car (entsel "\nPick second line: "))) ;select the second line
p3 (cdr (assoc 10 ent))
p4 (cdr (assoc 11 ent))
p0 (inters p1 p2 p3 p4)) ; p0 is the apparent intersection of the two lines.


;(command "line" p0)
;;;;;;;;;;;;

(command "dimangular" "" "appint" pause pause)

(princ)
)

« Last Edit: November 06, 2018, 03:35:29 PM by Biscuits »