cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Showing PTC_WM_CREATED_ON on a Drawing

jschaaf
4-Participant

Showing PTC_WM_CREATED_ON on a Drawing

Has anyone figured out how to show the original PTC_WM_CREATED_ON Windchill system attribute on a drawing without the time stamp and not updating everytime the drawing is checked in?

We have created a Site Level attribute in Windchill named HW_WM_CREATED_ON in Windchill that removes the timestamp.

We cannot figure out how to stop the attribute from updating at check in.

I would have to believe we are not the only company that wants the original created on date from Windchill in the title block of drawings?

 

Any and all help is appreciated.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
5 REPLIES 5

jschaaf
4-Participant
(To:MartinHanak)

Hi Martin,

 

Thanks for the quick reply.

I had found that workaround, the problem is the time stamp is still showing. Our use case is to show the date only.

TomU
23-Emerald IV
(To:jschaaf)

Basically you're stuck with using dead text. We have a parameter in our models that designers just manually fill in the first time the drawing is created.

There are games you can play with relations, but I'm not sure they're worth the effort since they would need to either be manually added to each model or present in your start parts before the models are created. Something like this:

1.) Set the config.pro option "date_type_parameter_format" to "%mm-%dd-%yy" (or whatever format you prefer).

2.) Create a custom string parameter to store the original date. (ex. "DATE_CREATED")

3.) Add the following relations to each model to populate the date:

IF DATE_CREATED == "" | DATE_CREATED == " "

DATE_CREATED = PTC_WM_CREATED_ON

ENDIF

BenLoosli
23-Emerald II
(To:jschaaf)

We did it at a prior company by adding relations to the start parts.

/* 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)

/* INITIAL RELEASE PARAMETERS
/* SET IR_INITIAL VALUES FOR DRAWING PARAMETERS FROM WINDCHILL
/* ONLY WHEN REV IS 0
if PTC_WM_REVISION == "0"
IR_INITIAL_CREATED_ON = SHORT_CREATED_ON
endif

In the titleblock for the date created field we used IR_INITIAL_CREATED_ON. It is updated only if the part revision is 0. Any new part created from the start part template or saved as from an existing part would get the current date in the title block when the rev was 0 only.

I would rather suggest to customize the attribute delegate service. So the attribute is being synchronized with the creation date in Windchill. You can read the very first checkin date and user and synchronize it with the cad model or drawing. Also the attribute is not editable in Creo or Windchill.

This is a customizing but runs since almost ever in PDMLink.

Top Tags