#1
|
|||
|
|||
Default rev. attributes
Hello,
I'd like to set a default value (for example "/" or "-") for some attributes related to revision of 2D drawings (such as CN1_DESCRIPTION, CN1_VERSION) so that the corresponding field in my 2D frame doesn't appear blank if it's not used. I don't know where I have to set it. thank you very much teo |
#2
|
|||
|
|||
Re: Default rev. attributes
Hi teo,
I think the best way to do temp. changes in TB-Attributes is to use the default predefined (empty) macro: DEFINE Awmc_m_add_tb_cust_infos PARAMETER Tb_ltab END_DEFINE This macro is called before the TR_UPDATE command is called in the titleblock update process. Here you can implement your own macrocode to search the empty values of changenote attributes. In the first column you will find the attributname -- in the second column the value ... Example: DEFINE Awmc_m_add_tb_cust_infos PARAMETER Tb_ltab LOCAL Change_empty_func (* Subfunction to search Attributevalue ... *) DEFINE Change_empty_func PARAMETER Attrib_name PARAMETER Value_when_empty LOCAL Sel_row LOCAL Sel_value SELECT_FROM_LTAB Tb_ltab COLUMN 1=Attrib_name END LET Sel_row (ABS (READ_LTAB 'sys_select' 1 1)) IF (Sel_row>0) LET Sel_value (STR (READ_LTAB Tb_ltab Sel_row 2)) IF (NOT (LEN (TRIM Sel_value))) WRITE_LTAB Tb_ltab Sel_row 2 Value_when_empty END_IF END_IF END_DEFINE (* Dump Tb_ltab - for testing only ... *) SAVE_LTAB Tb_ltab DEL_OLD "C:\temp\tb_before.txt" (* Search CN1_VERSION ... *) Change_empty_func "CN1_VERSION" "/" (* Search CN1_DESCRIPTION ... *) Change_empty_func "CN1_DESCRIPTION" "-" END_DEFINE Good luck -- Wilfried .... |
#3
|
|||
|
|||
Re: Default rev. attributes
Hallo Wilfried,
your suggestion is working fine, thank you very much. Teo |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|