CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > Data Management

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-28-2009, 02:54 AM
teoadams teoadams is offline
Registered User
 
Join Date: Aug 2004
Location: Milano
Posts: 49
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
Reply With Quote
  #2  
Old 01-29-2009, 12:14 PM
wilfried_loewe wilfried_loewe is offline
Registered User
 
Join Date: Jul 2004
Posts: 37
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 ....
Reply With Quote
  #3  
Old 01-30-2009, 01:16 AM
teoadams teoadams is offline
Registered User
 
Join Date: Aug 2004
Location: Milano
Posts: 49
Re: Default rev. attributes

Hallo Wilfried,
your suggestion is working fine, thank you very much.

Teo
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:29 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.