CHANGEBLK



The command CHANGEBLK overrides and sets the attribute values informed of various designs in a text file.
should be used in conjunction with the command BLKPROPS


To use:
  1. Calls the command CHANGEBLK on the AutoCAD command line.
  2. Enter the path of the file that contains the list of designs to replace or set values:

    This file should contain the following columns:
    1. "DRAWING" - Tells the dwg absolute path (eg: c:/ temp/exemplo.dwg)
    2. "HANDLE" - hexadecimal number that identifies the database block in AutoCAD
    3. "REPLACE" - TRUE or FALSE, tells whether the program should replace the block in the drawing rendered
    4. "X" - Tells the X coordinate in the WCS insertion point of the block
    5. "Y" - Tells the Y coordinate in the WCS insertion point of the block
    6. "ESCDWG" - Tells the scale block insert
    7. "rotation" - Tells the rotation block insert
    8. "VISIBILITY" - Dynamic Blocks usually have a"Visibility State", if any, will be informed here
    9. ATT1.... ATTN - The name of the attribute of the block. Will create a column for each attribute

    Note that these columns are the same as those created with the command BLKPROPS, even because this command should be used in conjunction with it.
    NOTE: numeric values use a point as decimal separator. If you use MS Excel , be careful with that.
  3. Enter the name of the text file that will be created with the result of the substitutions:
  4. Enter the name of the drawing that contains the block model to be replaced:
  5. Enter the name of the block that is on the design chosen in the previous step:
  6. Enter the name of the property "visibility state" if any. Dynamic blocks usually have such a property that the block representing different ways:
  7. Wait process, at the end you will see a message informing the end of execution:


At the end of the process to create the text file (chosen in the previous steps) with the result of replacements:
ok C: \ temp \ exemplo.dwg
ok C: \ temp \ exemplo.dwg
ok C: \ temp \ exemplo.dwg


The file created will contain the path of the dwg, and the result, reports OK if everything went right or the error that occurred while trying to process design.


An example:
Consider the result file from the command example BLKPROPS :
DESENHO	HANDLE	ERRO	LAYOUT	BLOCKNAME	X	Y	ESCDWG	ROTACAO	VISIBILITY	NOME_DO_PROJETO	PROGRAMA_Nº	FASE_DO_PROJETO	ÁREA_DO_PROJETO	PÁTIO	DISCIPLINA	ESTAQUEAMENTO	ESCALA	SE	Nº_DA_CONTRATADA	Nº_CLIENTE	REVISAO
C:\temp\exemplo.dwg	A903	OK	Layout2	CARIMBO	1.4495071809506E-12	-2.8421709430404E-14	0.001	0	GEOMÉTRICO/DRENAGEM	PROJETO GEOMETRICO	000000001	DETALHADO	ÁREA_DO_PROJETO	PÁTIO	DISCIPLINA	ESTAQUEAMENTO	1:1000	-	G-001-123	GHB-342	A
C:\temp\exemplo.dwg	95F4	OK	Layout1	CARIMBO	1.4495071809506E-12	-2.8421709430404E-14	0.001	0	GEOMÉTRICO/DRENAGEM	PROJETO GEOMETRICO	000000001	DETALHADO	ÁREA_DO_PROJETO	PÁTIO	DISCIPLINA	ESTAQUEAMENTO	1:1000	-	G-001-123	GHB-342	A
C:\temp\exemplo.dwg	5347	OK	Model	CARIMBO	97.5192702600576	-37.1841748881155	0.001	0	GEOMÉTRICO/DRENAGEM	PROJETO GEOMETRICO	000000001	DETALHADO	ÁREA_DO_PROJETO	PÁTIO	DISCIPLINA	ESTAQUEAMENTO	1:1000	-	G-001-123	GHB-342	A

Subst the column ERRO , by SUBSTITUI and change their values to TRUE:
DESENHO HANDLE SUSBTITUI LAYOUT BLOCKNAME X Y ESCDWG ROTACAO VISIBILITY NOME_DO_PROJETO PROGRAMA_Nº FASE_DO_PROJETO ÁREA_DO_PROJETO PÁTIO DISCIPLINA ESTAQUEAMENTO ESCALA SE Nº_DA_CONTRATADA Nº_CLIENTE REVISAO
C:\temp\exemplo.dwg A903 TRUE Layout2 CARIMBO 1.4495071809506E-12 -2.8421709430404E-14 0.001 0 GEOMÉTRICO/DRENAGEM PROJETO GEOMETRICO 000000001 DETALHADO ÁREA_DO_PROJETO PÁTIO DISCIPLINA ESTAQUEAMENTO 1:1000 - G-001-123 GHB-342 A
C:\temp\exemplo.dwg 95F4 TRUE Layout1 CARIMBO 1.4495071809506E-12 -2.8421709430404E-14 0.001 0 GEOMÉTRICO/DRENAGEM PROJETO GEOMETRICO 000000001 DETALHADO ÁREA_DO_PROJETO PÁTIO DISCIPLINA ESTAQUEAMENTO 1:1000 - G-001-123 GHB-342 A
C:\temp\exemplo.dwg 5347 TRUE Model CARIMBO 97.5192702600576 -37.1841748881155 0.001 0 GEOMÉTRICO/DRENAGEM PROJETO GEOMETRICO 000000001 DETALHADO ÁREA_DO_PROJETO PÁTIO DISCIPLINA ESTAQUEAMENTO 1:1000 - G-001-123 GHB-342 A


Purpose of this program:
Note that processing large numbers of files using a table in MS Excel enables consistency to the data filled in stamps.

Moreover, the speed of creating the list of documents the command CHANGEBLK BLKPROPS makes validation more efficient.