AllExperts > AutoCAD 
Search      
AutoCAD
Volunteer
Answers to thousands of questions
 Home · More AutoCAD Questions · Answer Library  · Encyclopedia ·
More AutoCAD Answers
Question Library

Ask a question about AutoCAD
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scott Cook
Expertise
I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience
Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.
 
   

You are here:  Experts > Computing/Technology > Computer-Aided Design > AutoCAD > arc length within lisp

AutoCAD - arc length within lisp


Expert: Scott Cook - 7/16/2007

Question
Within a lisp, can you select an arc and then call up it's length for calculations?

Answer
sure. look at the dxf reference in the online help for the entity codes which you can retrieve with the entget function. you'll need the starting and ending angle, which are stored in radians in a counterclockwise direction. you'll need some special case scenario if it passes thru 0 degrees, like adding 2pi to the end angle.
you'll need to write your own code to extract the start and end angle, but it will be something like this (untested):
(setq start_ang (cdr (assoc 51 (entget (car (entsel)))))

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.