Cancel
Showing results for 
Search instead for 
Did you mean: 

How to get automatic day.month.year in drawing template ?

Genius
Genius

Hello

How to get automatic day.month.year in drawing template ?

How the code goes to automatically get the date from windows 7 computer and NX 9.0 ?

 

Drafting/Drawing template's autodate ?

1 REPLY

Re: How to get automatic day.month.year in drawing template ?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

There is a way to get the date in the drawing.

In de expression editor (in modeling -> Ctrl-E) create the following expressions (all type string):
MyDate      = StringUpper(dateTimeString("localTime?", True))
MyDay       = subString(MyDate, 9, 10)
MyMonth     = subString(MyDate, 5, 7)
MyYear      = subString(MyDate, 21, 25)
MyTimeStamp = MyDay + " " + MyMonth + " " + MyYear

 

When this is created you have 2 options.

Drawing in part file:

  • Then in Drafting pasted this text into a note: <X0@MyTimeStamp>

 

Master model:

  • Create a template attribute (TIMESTAMP) in de model template that is linked to the expression
  • Create a template attribute (DB_DWG_TEMPLATE_TIMESTAMP) in the drawing template.

 

In both cases you need to update the datum manually in the model file.
(update date in Modeling with Tools -> Update -> Update for External Change)

 

i don't now if there is a faster way too do this in NX 9.


Ruud van den Brand
Pre-sales NX CAD
cards PLM Solutions