AutoCAD/LISP

Advertisement


Question
I am trying to write a simple LISP routine to convert inches to MM and MM to inches this is not for a specific drawing. I would like to run this from the command line as needed. I'm frustrated beyond belief. Can you help?

Answer
Hi Don,

We have Auto LISP function to convert from various units to required units which are supported by AutoCAD.

Here is the Auto LISP function CVUNIT
You can write a function to convert the value from one unit to another
Syntax: (CVUNIT <value> <From> <to>)
Ex: (CVUNIT 1.0 "inch" "cm")
A: 2.54

You can execute the Same from the Auto CAD command prompt.

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Ramanjaneyulu .J

Expertise

Any doubts bound to AutoCAD Customization with AutoLISP, VLISP, VBA, Objectarx and also with C#

Experience

I hold experience in the GIS industry in delivering the customized breakthroughs for the below products. AutoCAD AutoCAD Map AutoCAD Overlay

Organizations
Cyient(Infotech Enterprises Ltd) (Current) Avineon India Pvt Ltd DSM soft Alcor Technologis Pvt Ltd

Education/Credentials
Diplioma in Mechanical Engineering

©2016 About.com. All rights reserved.