Author Topic: Get values from points, assign block  (Read 1335 times)

0 Members and 1 Guest are viewing this topic.

zombies640

  • Guest
Get values from points, assign block
« on: September 23, 2016, 07:11:41 PM »
Pretty ambitious project for my first time getting into Lisp, but...we have points set up in the attached screenshot. The columns are surveyed first, then to survey the canpoy, a second shot is surveyed almost directly ontop of the column shot, and finally, a third survey shot is taken at the canopy edge. A line is drawn from the second shot to the third shot to determine the radius of the canopy.

I'm trying to take the number portion of "COLUMN 500" so the LISP can draw the inscribed circle at 0.5m diameter, measure the distance between shot 2 and 3, then apply a block (that resembles a circular canopy thing) that is scaled based on that line length.

I know this is complicated and I don't expect anyone to treat this as a request, but if you can offer some good reference material, I can try to do this on my own.

This is what I have so far:
Code: [Select]
(defun c:desc2 (/ descr eastng idx northng pnt pntobj ss)
  (if (setq ss (ssget '((0 . "AECC_COGO_POINT"))))
    (progn
      (setq idx -1)
      (while (setq pnt (ssname ss (setq idx (1+ idx))))
      (setq pntobj (vlax-ename->vla-object pnt))
      (setq descr (vlax-get pntobj 'fulldescription)
         eastng (vlax-get pntobj 'easting)
         northng (vlax-get pntobj 'northing)
      )
(setq descr (vl-string-trim "COLUMN " descr))
      (command "text" "c" (list eastng northng) "1" "0" descr)
    )
  )
)
(princ)
)

Thanks!
« Last Edit: September 23, 2016, 07:31:29 PM by zombies640 »