Jump to content

Recommended Posts

Posted

Good afternoon everyone,
I work for a company that deals with stone cladding and sometimes we need to indicate an oversizing of the pieces that can vary from 20, 50 or 100mm. When the pieces are few it is not a big problem but when they start to be 20 modifying all the dimensions of the pieces is quite laborious. Is there a lisp that makes the dimension show the real measurement of the piece above and the same measurement increased by 20, 50, or 100 mm below? Thank you very much in advance. P.S. I tried to use alternative measurements but without success.

Posted (edited)

Welcome aboard.

 

It could be as simple as this code, make a few defunc c:d-20, c:d-50 etc. It converts existing dimensions.

; https://www.cadtutor.net/forum/topic/94496-dimensions-lisp/

(defun c:D-20 ( / ss x obj)

(setq ss (ssget '((0 . "DIMENSION"))))

(if (= ss nil)
  (progn (alert "You have not picked dimensions \nWill now exit")(exit))
)

(repeat (setq x (sslength ss))
  (setq obj (vlax-ename->vla-object (ssname ss (setq x (1- x)))))
  (setq len (+ 20. (vlax-get obj 'measurement)))
  (vlax-put obj 'textoverride (strcat "<>\n" (rtos len 2 3)))
)

(princ)
)

Do you know anything about lisp ? 

 

 

Edited by BIGAL

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