We did a capture of the initial dates and user and used those in the format. Simple programming in our start parts at a former company.
When a part was copied to a new name, it would be at rev 0 and get the initial values for the drawing reset.
The IR_INITIAL values were used in the drawing titleblock so they remained static for that part number.
/* DRAWING PARAMETERS
/* ------------------
/* DATE PARAMETERS FROM WINDCHILL
/* ------------------------------
/* EXTRACT THE DATE PORTION OF THE WINDCHILL TIMESTAMP PARAMS
SHORT_CREATED_ON = EXTRACT(PTC_WM_CREATED_ON,1,10)
SHORT_APPROVED_DATE = EXTRACT(IR_APPROVED_DATE,1,10)
SHORT_MODIFIED_ON = EXTRACT(PTC_WM_MODIFIED_ON,1,10)
YEAR = EXTRACT(PTC_WM_MODIFIED_ON,1,4)
/* NAME PARAMETERS FROM WINDCHILL
/* -------------------------------
/* SHORTENED TO FIT THE DRAWING FORMATS
if STRING_LENGTH(IR_INITIAL_CREATED_BY) > 8
SHORT_CREATED_BY = EXTRACT(IR_INITIAL_CREATED_BY,1,8)
else
SHORT_CREATED_BY = IR_INITIAL_CREATED_BY
endif
if STRING_LENGTH(PTC_WM_MODIFIED_BY) > 8
SHORT_MODIFIED_BY = EXTRACT(PTC_WM_MODIFIED_BY,1,8)
else
SHORT_MODIFIED_BY = PTC_WM_MODIFIED_BY
endif
if STRING_LENGTH(IR_APPROVED_BY) > 8
SHORT_APPROVED_BY = EXTRACT(IR_APPROVED_BY,1,8)
else
SHORT_APPROVED_BY = IR_APPROVED_BY
endif
if STRING_LENGTH(IR_REV_APPROVED_BY) > 8
SHORT_REV_APPROVED_BY = EXTRACT(IR_REV_APPROVED_BY,1,8)
else
SHORT_REV_APPROVED_BY = IR_REV_APPROVED_BY
endif
/* INITIAL RELEASE PARAMETERS
/* SET IR_INITIAL VALUES FOR DRAWING PARAMETERS FROM WINDCHILL
/* ONLY WHEN REV IS 0
if PTC_WM_REVISION == "0"
IR_INITIAL_ECN = IR_ECN
IR_INITIAL_CREATED_BY = PTC_WM_CREATED_BY
IR_INITIAL_CREATED_ON = SHORT_CREATED_ON
endif
Thank you,
Ben H. Loosli
USEC, INC.