HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Send a Lisp program for arc length annotation

2010-04-12View Original

Thread Content

;============================== ; Arc length labeling ;============================== (defun C:hu (/ obj sel el e r ang angs ange larc pnt multi) (setvar "CMDECHO" 0) (setq multi (getvar 'dimlfac));;;Added on 2002.5.15; can be removed (setq obj (entsel "\nSelect ARC: ")) (setq sel (car obj)) (setq pnt (getpoint "Point: ")) (terpri) (if (/= sel nil) (progn (setq el (entget sel)) (setq e (assoc 0 el)) (if (= "ARC" (cdr e)) (progn (setq r (assoc 40 el)) (setq r (cdr r)) (setq angs (assoc 50 el)) (setq angs (cdr angs)) (setq ange (assoc 51 el)) (setq ange (cdr ange)) (setq ang (- ange angs)) (if (< ang 0) (setq ang (- (* 2 pi) (abs ang))) ) (setq larc (* r ang)) (setq larc (* larc multi));;;Added on 2002.2.20; can be removed ;;;multi represents the number of repetitions ;;;(princ "Angle = ") ;;;(prin1 (* (/ ang pi) 180)) ;;;(princ " , Radius = ") ;;;(prin1 r) ;;;(princ "\nLength of ARC is: ") ;;;(prin1 larc) ) (princ "The object is not an ARC!") ) ) ) (setq larc (rtos larc 2 1) ) (command "dimangular" obj "t" larc pnt ) (princ) ) 
Reply #22010-04-16
In CAD, arc length dimensions can be used directly, right... DAR

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.