Jump to content

changing diameter to nearest value


razaim

Recommended Posts

Hi, I am new to this forum.

 

Okay, so not surprisingly, I have a question.

 

 

I need a way to select multiple circles and round them off/up to their nearest value. for example: all circles with a radi of a value less than 7 but greater than 6.5 AND a value of greater then 7 but less then 7.5 should be converted to 7 (no other value except zero behind the first decimal).

 

Any command or little script could be really helpfull. I myself have no scripting knowledge.If you have a solution and are willing to help me out then please!

Link to comment
Share on other sites

Hi, I am new to this forum.

 

Okay, so not surprisingly, I have a question.

 

 

I need a way to select multiple circles and round them off/up to their nearest value. for example: all circles with a radi of a value less than 7 but greater than 6.5 AND a value of greater then 7 but less then 7.5 should be converted to 7 (no other value except zero behind the first decimal).

 

Any command or little script could be really helpfull. I myself have no scripting knowledge.If you have a solution and are willing to help me out then please!

 

 

Use FILTER and then Properties after the selection set has been created with the Filter command.

Link to comment
Share on other sites

Or run this lisp:

(defun c:round()
 (setq ss (ssget "X" (list '(0 . "CIRCLE"))))
 (repeat (setq i (sslength ss))
   (setq c (entget (ssname ss (setq i (1- i)))))
   (setq r (fix (+ (cdr (assoc 40 c)) 0.5)))
   (entmod (subst (cons 40 r) (assoc 40 c) c))
   )
 )

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...