DRAGONFRAME 4 EDIT DOWN DIALOGUE UPDATE
) Update blocks composing of nested blocks inserted unselected ( setq ss ( vla-object ( ssname ss ( setq n ( 1- n ))) ) ) ( att_upd obj ) ( scl_upd obj ) ) ) ) Lst ( reverse ( cons ( vla-get-Name ent ) ( reverse lst ))) ) ) ) ( setq n_lst ( 1+ n_lst )) ) ) If "whole collection" ( vlax-for bl ( vla-get-blocks AcDoc ) ( if ( and ( = :vlax-false ( vla-get-isLayout bl )) ( = :vlax-false ( vla-get-isXref bl )) ) ( setq lst ( cons ( vla-get-name bl ) lst )) ) ) ) Editing blocks ( mapcar ' ( lambda ( name ) ( setq bloc ( vla-item ( vla-get-blocks AcDoc ) name )) ( if ( and e_scl ( if ( and ( = ( vla-get-ObjectName ent ) "AcDbBlockReference" ) ( not ( member ( vla-get-name ent ) lst )) ) ( setq ( vlax-ename->vla-object ( ssname ss ( setq n ( 1- n )))) ) ( if ( and ( member ( vla-get-EffectiveName obj ) lst ) ( not ( member ( vla-get-Name obj ) lst )) ) ( setq lst ( cons ( vla-get-Name obj ) lst )) ) ) ) Adding blocks composing of nested blocks to the list ( setq n_lst 0 ) ( while ( setq name ( nth n_lst lst )) ( setq bloc ( vla-item ( vla-get-blocks acDoc ) name )) ( vlax-for ent bloc "`*U*" )))) ( repeat ( setq n ( sslength ss )) ( setq ( vla-get-isXref ( vla-item ( vla-get-Blocks AcDoc ) name ) ) ) ) ( setq lst ( cons name lst )) ) ) Adding anonymous dynamic blocks ( and ( setq ss ( ssget "_X" ' (( 0. ( vl-load-com ) ( defun c:edit_bloc ( / FunctionsĮ_b_err edit_prop scl_upd att_upd sub_upd Parameters and properties of dynamic blocks are not taken into account by the scale changes, a dialog box asks for confirmation or invalidation changes across the block. Blocks inserted in the drawing are updated according to the changes made. The component blocks of nested blocks are processed. It is possible to : - change the global scale - change the insertion unit (versions after ACAD 2005) - put objects within blocks of the layer of choice - change the color, line type, line thickness and style plot (STB only) components ByBlock or ByLayer. The changes affect : - either all blocks in the collection (or not inserted) - either all blocks that are inserted - a selection of blocks ?in the drawing. Edit_bloc - Gilles Chanteau - version 3.6 - 04/05/07 Redefines the blocks after modifying the properties of their components. Save this file with the LISP (.lsp) extension “Edit_Bloc.lsp After you have selected a block, any other instances of that block in the drawing will be updated as well. You only need to select one of each block. Select the blocks whose color you want to change.Click the “Selection” button from the dialog.I simply used Google Translate to translate some of the prompts… Note: this routine is made by Gilles Chanteau and was originally written in French. In the animation below: There are a couple of those stubborn blocks that even when selected and placed on another layer, they simply wont display the correct color. Try them out and let post your findings in the comments section below. That is all that I have used this routine for, yet it seems that there are other handy functions. This routine comes in handy when I come across blocks who say that their properties are “bylayer” yet they show as another color. lsp FILE EXCEPT THAT YOU SAVE IT WITH THE FILE EXTENSION. dcl FILE IN THE SAME MANNER AS YOU WOULD A. The very first thing that I must say is that there are 2 files for this tool to work 1).