Author Topic: question on creating a new layer  (Read 2715 times)

0 Members and 1 Guest are viewing this topic.

stsevedallas

  • Guest
question on creating a new layer
« on: June 12, 2006, 03:49:48 PM »
How can I automatically create a layer with todays date as the title?

Right off hand I know the "date" variable can be used.
Such as...

(command "layer" "m" (strcat  "revision " (getvar "date")) "")

I would want the date to be in the format of 06-12-06.
Thanks all

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
Re: question on creating a new layer
« Reply #1 on: June 12, 2006, 04:53:40 PM »
Like so:
Code: [Select]
(setq date (menucmd "M=$(edtime,$(getvar,date),MO-DD-YY)"))
(command "layer" "m" (strcat  "revision " date ""))

stsevedallas

  • Guest
Re: question on creating a new layer
« Reply #2 on: June 12, 2006, 05:42:13 PM »
Thank you

Joe Burke

  • Guest
Re: question on creating a new layer
« Reply #3 on: June 13, 2006, 10:19:38 AM »
I wonder if anyone else thinks dates expressed as six digits should be in the format yymmdd? That way the meaning of 060606 (last week) is potentially clear since there's some logic to the progression.

Not to mention the fact, if that date format is used at the start of file names, files will sort by date and by name the same way in Win Explorer.

I ask the question because it came up recently where I'm working now. Personally I've always used the yymmdd format.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: question on creating a new layer
« Reply #4 on: June 13, 2006, 10:41:00 AM »
We use ddmmmyy i.e. 13Jun06 ... the reason ... well because that is what the software recognizes and if it ain't broke and there is no compelling reason to change something that works already ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: question on creating a new layer
« Reply #5 on: June 13, 2006, 10:43:26 AM »
<2˘>I've always used yyyy-mm-dd or it's variants as (sorting considerations aside) yy-mm-dd can be too easily confused with mm-dd-yy or dd-mm-yy formats which a lot of people (grrr) use.

e.g. without an accompanying spec what is 06-05-04?

Is it 2006/05/04?
Is it 2004/05/06?
Is it 2004/06/05?
...

Bah.

2006-05-04 is clear to me and doesn't need an accompanying spec.</2˘>
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: question on creating a new layer
« Reply #6 on: June 13, 2006, 11:13:08 AM »
I agree with your point on confusion.  I have “file-save-as” lisp that prefixes the date to the file name.  And it is currently in the mm-dd-yy format.  We have not had a problem with drawing files due to the short construction document phase.  However we experience a problem the photos that we take for a project which can span over the New Year. 

I am contemplating of changing my format of my lisp routine.  I will wait see on how this thread will play out.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

T.Willey

  • Needs a day job
  • Posts: 5251
Re: question on creating a new layer
« Reply #7 on: June 13, 2006, 11:50:41 AM »
In the past, when working with others in the office, I used the yy-mm-dd format, and like it a lot.  Now that I work mostly by myself, and use the lisp routines I write, by myself, I have gotten lazy and use the dd-mm-yy format.  After reading this, I might go back to the yy-mm-dd format, or as Michael pointed out yyyy-mm-dd format which will take away all confusion.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: question on creating a new layer
« Reply #8 on: June 13, 2006, 06:23:26 PM »
Quote
..always used yyyy-mm-dd or it's variants..

ditto.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CADaver

  • Guest
Re: question on creating a new layer
« Reply #9 on: June 13, 2006, 09:15:11 PM »
dd-mmm-yyyy

Joe Burke

  • Guest
Re: question on creating a new layer
« Reply #10 on: June 14, 2006, 07:18:25 AM »
Michael,

Your suggestion makes sense.

Thanks to all who replied.