- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I need help with LISP program that can editing the dimension to add text. Below is the screenshot to show what I'm trying to achieve here.
I've also copied below the code I'm using to create diameter dimension to help you helping me.
(defun AutoDimDia ( x pt-for-dim / circle pt-on-circle )
(if (and x ; get the last object
(= "CIRCLE" (cdr (assoc 0 (entget x)))) ; is it really a circle?
(setq pt-on-circle (polar (cdr (assoc 10 (entget x))) ; get circle's centre point
(cdr (assoc 40 (entget x))) ; get circle's radius
(* pi 0.5))) ; 45°
)
(command "_.DIMDIAMETER"
(list x ; just object is not enough, some commands needs both ename and point, combined into list '(ename (10 10 0))
pt-on-circle)
"_none" pt-for-dim) ; don't forget turn off OSNAPS
)
(princ)
)
Solved! Go to Solution.