Jump to content

Recommended Posts

Posted

hopefully you can read the red text on the picture as it explains what i'm looking for...if not, let me know and I'll type it out again. thank you 

 

 

1296704404_LAYOUTLISPNUMBER.thumb.png.9992f6e059cd3a3cf821405e515ac452.png

 

Posted

Red text against a black background is never easy to read.

Posted (edited)
1 hour ago, ReMark said:

Red text against a black background is never easy to read.

image.thumb.png.407386b9ea3afff0c57fc22e5c9531d4.png:) 

Edited by ronjonp
Posted (edited)

Here is an example note layout names include "Model" it numbers based on layout order as this can be different to just get layout names. Use the (vla-get-count tabs) for the number of layouts - 1.

 

(defun c:1rev ( / len doc lay plotabs newstr tabname oldtagn ss1 att x y)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq tabs (vla-get-Layouts doc))
(setq y 0)
(setq bname "DA1DRTXT")
(setq oldtagn "REV_NO")
(setq newstr (-(getint "Please enter version for sheets..") 1))
(repeat (vla-get-count tabs)
(vlax-for lay tabs
(setq x (vla-get-taborder lay))
(setq tabname (vla-get-name lay))
(if (and (= y x) (/= tabname "Model"))
(progn
      (setvar "ctab" tabname)
      (setq ss1 (ssget "x"  (list (cons 0 "INSERT") (cons 2 bname)(cons 410 tabname))))
      (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 0 )) 'getattributes)
        (if (= oldtagn (strcase (vla-get-tagstring att)))
           (vla-put-textstring att (rtos (setq newstr (+ newstr 1)) 2 0))
        )
      )
)
)
)
(setq y (+ y 1))
)
)
(c:1rev)

 

 

 

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