added function to create AECC points based on computed distance and changed a couple of the prompts
;;; function
;;; compute proportionate distances based on plat & field
;;; distances. input can be either keyboard on picked points
;;;
;;; arguments
;;; none
;;;
;;; usage
;;; proprt = just computes the distance (r14+)
;;; proprtc = computes the distance and draws a circle from
;;; selected point with a radius equal the computer
;;; distance. (2000+)
;;; proprtp = computes and inserts an aecc point along the
;;; selected bearing.(land desktop 2, 2i, 3, 4 and 2005)
;;;
;;;
;;; platforms
;;; r14+
;;;
;;; author
;;; copyright© 2004 mark s. thomas
;;; mark@theswamp.org
;;;
;;; version
;;; 1.2 mon oct 04, 2004 14:00:24
;;; 1.3 mon oct 04, 2004 14:48:02
;;;
;;; todo:
;;; make sure user is running ldt before starting 'proprtp'
;;; write documentation
(defun mst-createcogopoint (pointcoords / aeccproject pnts newpoint)
(vl-load-com)
(vl-catch-all-apply
(function
(lambda ()
(setq aeccproject
(vlax-get-property
(vla-getinterfaceobject
(vlax-get-acad-object) "aecc.application")
'activeproject)
); setq
(setq pnts
(vlax-get-property
aeccproject 'cogopoints)
); setq
(setq
count (vlax-get-property pnts 'count)
)
(setq
newpoint
(vlax-invoke-method pnts 'add
(vlax-3d-point pointcoords) 1)
); setq
(setq
newpointnum (vlax-get-property newpoint 'number)
)
); lambda
); function
); vl-catch-all-apply
); defun
(defun c:proprt (/ p_block m_block lot)
(princ "\ncompute proportionate distances based on plat & field measurments")
(if (setq p_block (getdist "\nplatted block dimension: "))
(if (setq m_block (getdist "\nmeasured block dimension: "))
(while (setq lot (getreal "\nplatted lot dimension to proportion (<enter> to quit): "))
;; note: '_pa' is global
;; this allows the us to use the computed distance
;; with native acad commands, like 'circle'
;; example
;; command: circle
;; specify center point for circle or [3p/2p/ttr (tan tan radius)]:
;; specify radius of circle or [diameter] <49.9855>: !_pa
;; 49.9855
(setq _pa (* (/ lot p_block) m_block))
(princ (strcat "proportionate dimension = " (rtos _pa)))
)
)
)
(princ)
)
(defun c:proprtc (/ p_block m_block lot _pa)
(princ "\ncompute proportionate distances based on plat & field measurments")
(if (setq p_block (getdist "\nplatted block dimension: "))
(if (setq m_block (getdist "\nmeasured block dimension: "))
(if (setq lot (getreal "\nplatted lot dimension to proportion (<enter> to quit): "))
(progn
(setq _pa (* (/ lot p_block) m_block))
(princ (strcat "proportionate dimension = " (rtos _pa)))
(vl-cmdf "_circle" (getpoint "\nspecify center point for circle: ") _pa)
)
)
)
)
(princ)
)
(defun c:proprtp (/ p_block m_block lot start_pt dir _pa)
(princ "\ncreate an aecc point using proportionate distances")
(princ "based on plat & field measurments")
(if (setq p_block (getdist "\nplatted block dimension: "))
(if (setq m_block (getdist "\nmeasured block dimension: "))
(if (setq start_pt (getpoint "\nselect start point: "))
(if (setq dir (angle start_pt (getpoint start_pt "\nselect point for direction: ")))
(while (setq lot (getreal "\nplatted lot dimension to proportion (<enter> to quit): "))
(setq _pa (* (/ lot p_block) m_block))
(princ (strcat "proportionate dimension = " (rtos _pa)))
(mst-createcogopoint (polar start_pt dir _pa))
)
)
)
)
)
(princ)
)