Script

I am trying to write a scipt that automatically performs following commands:
zoom extends
explode all (I do not want any blocks remaining in the drawing -
sometimes blocks are nested)
purge all (to make sure all unwanted items such as legacy block names and linetypes are gone)
wblock (start a new wblock routine that then lets me pick entities to form a block and save the block under a certain name while it remains in the drawing - after that wblock the entire drawing with a different name)
I have come up with following script (that does not work, depending on the state of the drawing on which it is applied to):
^C^C zoom e explode ALL PURGE wblock
I an trying to learn as I go along but after a full morning wasted I would certainly appreciate some help.
Thanks
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
try this:
^C^Czoom e^Mexplode all^M^M-purge all^M^Mn^Mwblock^M

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks for the help. Just what I needed to get started on macros.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.