Looking to make a selection set of points that are on a specific layer, and then create a dimension between, in this case, two points. I feel like it should be very simple, but I can't get it to work for the life of me. Here is the test code I've been playing around with:
(defun c:test (/ sel1 TC)
(setq sel1 (ssget "X" '((8 . "VPOINTS"))))
(setq TC (polar (entget (assoc 10 (ssname sel1 0))) (dtr 180.0) 9))
(command "DIMLINEAR" (entget (assoc 10 (ssname sel1 0))) (entget (assoc 10 (ssname sel1 1))) "V" (polar TC (dtr 180.0) 9) "")
(defun dtr (x)
;define degrees to radians function
(* pi (/ x 180.0))
;divide the angle by 180 then
;multiply the result by the constant PI
) ;end of function
Any help would be greatly appreciated. Thanks.
[Posting the same question on two threads isn't a good idea, not least because someone who finds one of them later, looking for an answer to a similar question, will have no way of knowing that it was answered on another thread.]
See my reply to your other thread. I think you would be well served by spending some time looking over the entries in the AutoLISP Reference for the various functions involved, and becoming more familiar with the kinds of information they want as arguments, and the kinds of information they return. What you have is trying to apply various functions to various things to which they are not applicable.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register