Author Topic: problem with vl-file-systime  (Read 1734 times)

0 Members and 1 Guest are viewing this topic.

haibinpro

  • Newt
  • Posts: 52
problem with vl-file-systime
« on: January 08, 2015, 02:15:00 AM »
vl-file-systime can use to getthe edittime of a file if the file is not currently use.

something like this:
command: (vl-file-systime "c:/Documents and Settings/Administrator/desktop/pass.dwg")
(2015 1 4 8 15 4 21 718)

but if the file need to check edittime is currently use,it return nil
something like this:
command: (vl-file-systime "c:/Documents and Settings/Administrator/desktop/pass2.dwg")
nil

althoutht I can use the copy command to make a bak and check the bakfile's edittime
like this:
command: (copyfile "c:/Documents and Settings/Administrator/desktop/pass2.dwg"
"c:/Documents and Settings/Administrator/desktop/pass3.dwg")
0
command: (vl-file-systime "c:/Documents and Settings/Administrator/desktop/pass3.dwg")
(2015 1 4 8 15 5 31 531)


is there any convinient way to get the file's edittime (no wether the file is opening or not)


I search the forum  and find this
http://www.theswamp.org/index.php?topic=43559.msg488184#msg488184
命令: _qsave
命令: (rtos (getvar "cdate") 2 20)
"20150108.15283367"
命令: (rtos (lastmodified (getvar "dwgname")) 2 20)
"2457031.644756944"
命令: (rtos (getvar "date") 2 20)
"2457031.645215197"

the problem solve.
thx

I try to remove this.
and it return
You cannot delete your own topics in this board. Check to make sure this topic wasn't just moved to another board.
« Last Edit: January 08, 2015, 02:30:45 AM by haibinpro »

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: problem with vl-file-systime
« Reply #1 on: January 08, 2015, 02:49:51 AM »
haibinpro,
I was going remove this post for you but decided to leave it as is.
The post has the potential for others to learn from because it describes your problem and a solution.

Regards,
 
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: problem with vl-file-systime
« Reply #2 on: January 08, 2015, 02:55:50 AM »
Just an extra, this one works pretty nice too: http://www.theswamp.org/index.php?topic=43559.msg532413#msg532413
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.