Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creo - year of creation in a note

Status
Not open for further replies.

Somers

Mechanical
Feb 10, 2023
9
Hello,

I am looking for a way to put the current year on drawing, like todays date. The latter i found how to do that. HOwever the year only is something different apparently. We want to have a drawing format, that updates this year number by itself according to the year in which a drawing is made. So it can be like the "&todays_date " which turns into 'dead text' once applied.

Thanks in advance for the help!
 
Replies continue below

Recommended for you

The cheapest method is to create formats with the year already filled in. Ten formats will cover the next decade. The format name can have the year as a suffix.
 
No way to do that automatically.
What I do is I have the copyright @ year note in a table on the format. In the drawing template, I have a parameter for year. The end of the year or beginning of the new year, I revise the templates with the current year. I have 5 templates to update annually, but it only takes about an hour to do them all and get them checked back into Windchill.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
looslib - are parameters accessible/modifiable from within Windchill? Then checkout, modify the Windchill parameter, check-in, and publish may be an option.
 
is it possible to use relations on text? Like in excel where you can say, give me the last 4 numbers of the value of cell xxyy333?
I can imagine that a work around could work then as you can put the complete date of today on drawing.
could be a workaround?
 
As far as I know relations are part of the modeling, not available to the drawing and not part of templates. If it was, it would update every year the drawing was opened. You could use a relation in the model to create a parameter on the drawing, but that would also be updated when the model is regenerated.
 
ok so thats the reason this parameters 'drops dead' once added to drawing?
 
Right, relations are not a function of drawings or drawing templates.
Parameters can be uploaded to Windchill, but they are not editable from within Windchill. Maybe with some special code it could be possible, but not in OOTB Windchill.
It is documented in older PTC manuals that the date becomes fixed once it is added to a drawing.
You can use relations in the model that can extract the date or year from various system parameters. We used to do this to fix a creation date for the drawings and would only update IF the revision was '0'. We also did it for some names.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
We dont have windchill so no options there.
I can assume there is also no link back possible to this dead text on drawing?
So you open a drawing, it creates the date from the &todays_date , it is not possible to put that into a variable? It can stay dead, thats no problem, thats what we would like.
I could use some relations to get the last four numbers to obtain the year.
If i understand correctly that is not possible?

Thanks for your answers so far :)
 
Does Creo add parameters like PTC_WM_MODIFIED_ON even without Windchill?
If so, this may work:
YEAR='20'+extract(PTC_WM_MODIFIED_ON,8,2)

This will change the year to the current year every time the drawing is modified.
I created that in the drawing itself, but you may be able to create it in a template.
Some relations do work in drawings.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
Unfortunately that doesnt work. Thanks for the suggestion
 
not a complete solution yet but i fiddling around with a mapkey that can run an os script.
The os script can run a python script dat generates an xml file with parameters of my liking like the date drawn and year in it.
So that could allow me to get the desired date data into creo as i then can use another mapkey to import this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor