Jump to content

Reduce decimal points of absorbed ordinates.


wimal

Recommended Posts

(setq pt1 (getpoint"\n First corner ")); select all
(setq pt2 (getcorner pt1"\n 2nd corner")) 
(setq ss (ssget"C"pt1 pt2  '((0 . "circle")) )); all circles
 (repeat   (setq i (sslength ss));repeat1
                   (setq i (1- i))
                   (setq     e (ssname ss i))
                   (setq   center (cdr (assoc 10 (entget e)))); centre of circle
       (setq x (car center));in mm
         (setq y (cadr center))

(command-s "text" (list 100 100) 100  0 x)

The inserted X value is 2514.1251598456874 like that.

I want to insert as 2514.125

How can i reduce the decimal points.

LUPREC settings does not work with this.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...