Dynamic Block to Static Block - Renamed after Visibility State

Dynamic Block to Static Block - Renamed after Visibility State

Anonymous
Not applicable
4,196 Views
20 Replies
Message 1 of 21

Dynamic Block to Static Block - Renamed after Visibility State

Anonymous
Not applicable

Hi all,

This post sort of follows on from an existing forum post but I wanted a new post to get some attention. The original post relates to a LISP code that turns Dynamic Blocks into Static Blocks, renamed to: STATIC_*sequential number*.

The post can found here: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-dynamic-block-to-regular-bloc...

 

The above post addressed naming the new static blocks after the Dynamic Block name, followed by a sequential number (i.e.).

What I would like to achieve is the same process but with a static block name matching the visibility state (ideally with the sequential number suffix removed) of the dynamic block when the LISP is run.

I've attached the existing .lsp using the block name setup from the previous post linked above.

I have very limited LISP/VLISP experience and knowledge and have only ever done a tiny bit of basic AutoCAD scripting.

 

If anyone could help it would be greatly appreciated and if anyone needs any additional information of details please let me know!

Thanks in advance,

 

Jack

0 Likes
4,197 Views
20 Replies
Replies (20)
Message 21 of 21

ss6153
Enthusiast
Enthusiast

Hi @pbejse 

This question was asked quite a while back but I hope you can still help me out.. 
I am in need of the same thing as the person who posted the question originally. 

But I don't know how to use your lisp program.

For the original Undyanmic lisp by MP Seagull, I had inserted the dynamic block in a drawing and copy pasted it multiple times and changed each into a different visibilty state. Then I loaded the lisp and called the Undynamic command and it worked just fine.

Only problem was the name was something like  "STATIC_100000X". 
But when i loaded your lisp and called the UndynamicVisName command...

i got an error saying: Authentcation error. Invalid Input. 
Could you please help me out?
Thanks a lot 

0 Likes