Thonyb Posted yesterday at 03:56 PM Posted yesterday at 03:56 PM Hi everyone, My topic may have been addressed already, but I couldn’t find it. Here’s my situation: I have a large number of drawings (around 900), and I need to batch-change the visibility state of a specific dynamic block, similar to this thread: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-edit-visibility-state-of-dynamic-block/td-p/5629689 I know Lee-Mac has several .lsp routines that use ObjectDBX (OBDX). I’m not much of a coder, but I’m hoping someone here could help me put something together (or point me to the right approach). Thanks! Quote
BIGAL Posted 17 hours ago Posted 17 hours ago If you don't want to go down the OBDX method you can use a simple script to edit multiple dwgs. There are various ways to get a dwg name list, I use Word to make a script like this. Start with a list of dwgs, you can Replace ^p with a new line, ^p(load "chgvis") same for close the ^p is end of line. Another can get lisp to write the script file. Use (vl-directory-files "D:\\acadtemp" "*.dwg" 1) to get a list of dwg names. Open dwg1 (load "chgvis") Close Y Open dwg2 (load "chgvis") Close Y Open dwg3 (load "chgvis") Close Y Open dwg4 (load "chgvis") Close Y Yes 1st step is get lisp code to work. Use Lee-mac dynamic block lisp to change visibility, Don't forget must use SSGET '((0 . "INSERT")) but must then look for "Effectivename" of the block objects as Dynamic blocks usually have a name like "*U12". Lastly I use an old fashioned DOS command as it can get a list of dwg names including sub directories. Have a go if get stuck post again. Quote
Recommended Posts
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.