Author Topic: WHOHAS.lsp  (Read 5402 times)

0 Members and 1 Guest are viewing this topic.

AfricaAD

  • Guest
WHOHAS.lsp
« on: September 24, 2004, 12:57:35 PM »
Some odd reason, this lisp does not always tell 'who' has the drawing file open. How so? Is there a specific setting the server/ACAD, etc. needs to be set? Is there another lisp similar to this that works better?

We use Acad2k2

Andrea

  • Water Moccasin
  • Posts: 2372
WHOHAS.lsp
« Reply #1 on: September 28, 2004, 02:11:12 PM »
do you have novell network ??

With AutoCAD 2004 you don't need any lisp.
Keep smile...

AfricaAD

  • Guest
WHOHAS.lsp
« Reply #2 on: September 28, 2004, 02:58:19 PM »
We use a windows network, and we aren't looking into any upgrades anytime soon.

hudster

  • Gator
  • Posts: 2848
WHOHAS.lsp
« Reply #3 on: May 24, 2005, 06:50:01 AM »
I can't find a way to get whohas to work either.

There is another way to find out though, if you open the dwl file with notepad, it tells you who opened the file and when.
This is how whohas should do it, but doesn't.

I'm sure some of the lisp gurus in here would be able to write up a quick lisp whic would do this for you if they had time, but in the meantime you can at least find out who opened the file.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
WHOHAS.lsp
« Reply #4 on: May 24, 2005, 07:21:35 AM »
I was under the impression that all machines had to have the same lisp running (possibly in the start-up routine), and be logged on as an individual user.
Our network has me logged onto one server as me but the windows password is the same for everyone, so I dont think whohas.lsp works for us.
Thanks for explaining the word "many" to me, it means a lot.

hudster

  • Gator
  • Posts: 2848
WHOHAS.lsp
« Reply #5 on: May 24, 2005, 08:01:09 AM »
open the dwl file with notepad, if it has your info then it woudl work for you.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

daron

  • Guest
WHOHAS.lsp
« Reply #6 on: May 24, 2005, 08:08:57 AM »
Yes, the people who you're trying to find have to have it loaded on their machines too. BTW, whohas is an arx file, not a lisp.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
WHOHAS.lsp
« Reply #7 on: May 24, 2005, 08:28:17 AM »
Whohas (if I recall correctly) doesn't work quite right if someone opens a drawing via explorer, that is, they double click it whilst in Windows Explorer.

A work around that I did (again, if I recall correctly) was to pen a little uility that fires on start up -> if WhoHas isn't loaded it writes out the same data (loginname, date, time).

Something like that. I'll try to remember to look this up later today.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
WHOHAS.lsp
« Reply #8 on: May 24, 2005, 09:26:16 AM »
Quote from: Hudster
open the dwl file with notepad, if it has your info then it woudl work for you.


Where are the dwl files located? :oops:

I have searched my local drive and the network project drive and I can only see one, and thats not todays.

Many thanks
Thanks for explaining the word "many" to me, it means a lot.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
WHOHAS.lsp
« Reply #9 on: May 24, 2005, 09:30:43 AM »
I worked at a company that had a repository for all dwg. It was a network drive that couldn't be accessed through explorer.  If you wanted a particular dwg you ran a lisp that would open a check in/out dialog. You would enter the dwg number and selet check in or check out.  If you checked a dwg out of the repos it would cut the dwg to a specified folder on your C: (everyone was the same) Then it would open it from you C:. Once it cut it it created a file with the dwg number and a .out extension.  This was a text file that had the time of check out and user who check it out, so if you tried to open a dwg that someone already had checked out if showed you who and when in the dialog.  Only the person whom checked it out could check it in.

This was a pretty nice solution, and it worked quite well.  Ibelieve that they paid someone to write it for them but I am sure that it could be duplicated.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

hudster

  • Gator
  • Posts: 2848
WHOHAS.lsp
« Reply #10 on: May 24, 2005, 09:44:18 AM »
Quote from: jonesy
Where are the dwl files located?


mine are in the same folder as the file I opened, they may be hidden files so you might need to change the setting in your windows explorer
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

pmvliet

  • Guest
WHOHAS.lsp
« Reply #11 on: May 24, 2005, 10:37:09 AM »
I don't belive autocad 2002 created DWL files.

Pieter

MikePerry

  • Guest
WHOHAS.lsp
« Reply #12 on: May 24, 2005, 12:56:55 PM »
Hi

Check out the following Technical Documents on the Autodesk web site under the Knowledge Base section -

ID: TS25122  - Determine who has drawing open

ID: TS72770 - DWL files in AutoCAD® Release 14 and later releases

Have a good one, Mike

hudster

  • Gator
  • Posts: 2848
WHOHAS.lsp
« Reply #13 on: May 25, 2005, 04:00:36 AM »
I set our custom.mnl file to include the following (arxload "whohas") this autoloads the whohas.arx file whenever autocad is started.

I still can't get whohas to work, but at least I can look at the DWL file to see who opened the drawing.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
WHOHAS.lsp
« Reply #14 on: May 25, 2005, 05:06:29 AM »
Quote from: pmvliet
I don't belive autocad 2002 created DWL files.

Pieter


Ah, but reading the articles from Autodesk (thanks Mike) it seems like the whohas.arx file creates them for their own use, or have I read that wrong?

I think when we eventually upgrade to full ACAD we will look into that utility, but while over 50% of the company use LT, there is no point.
Thanks for explaining the word "many" to me, it means a lot.

MikePerry

  • Guest
WHOHAS.lsp
« Reply #15 on: May 25, 2005, 11:38:17 AM »
Quote from: jonesy
Ah, but reading the articles from Autodesk (thanks Mike) it seems like the whohas.arx file creates them for their own use, or have I read that wrong?
Hi

Nope! you have it correct...

Have a good one, Mike

CottageCGirl

  • Guest
WHOHAS.lsp
« Reply #16 on: May 26, 2005, 01:06:49 PM »
I was told, that because we don't have individual licences (we have that corporate networking licence deal-thing) that it wont work, so we wander aimlessly saying "who has xxx open???"  :(

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
WHOHAS.lsp
« Reply #17 on: May 26, 2005, 03:47:09 PM »
Perhaps this will help --

Code: [Select]
(defun MakeDWL ( / _stripext _stripfolder _filebase _datetime filename filehandle )

    (defun _stripext ( filename / i j )
        (repeat (setq i (strlen filename))
            (if (null j)
                (if (eq 46 (ascii (substr filename i)))
                    (setq j i)
                )
            )
            (setq i (1- i))
        )
        (if j
            (substr filename 1 (1- j))
            filename
        )
    )

    (defun _stripfolder ( filename / i j )
        (repeat (setq i (strlen filename))
            (if (null j)
                (if (member (ascii (substr filename i)) '(92 47))
                    (setq j i)
                )
            )
            (setq i (1- i))
        )
        (if j
            (substr filename (1+ j))
            filename
        )
    )

    (defun _filebase ( filename / i j )
        (if (eq 'subr (type vl-filename-base))
            (vl-filename-base filename)
            (_stripfolder (_stripext filename))
        )
    )

    (defun _datetime ( a b c d e f delimeter / raw )
        (strcat
            (substr (setq raw (rtos (getvar "cdate") 2 15)) a b)
            delimeter
            (substr raw c d)
            delimeter
            (substr raw e f)
        )
    )

    (cond
        (
            (and
                (eq 1 (getvar "writestat"))
                (setq filehandle
                    (open
                        (setq filename
                            (strcat
                                (getvar "dwgprefix")
                                (_filebase (getvar "dwgname"))
                                ".dwl"
                            )
                        )
                        "w"
                    )
                )
            )
            (princ (strcat (getvar "loginname") "\n") filehandle)
            (princ (strcat (getenv "computername") "\n") filehandle)
            (princ
                (strcat
                    (_datetime 1 4 5 2 7 2 "/") ;; date
                    " "
                    (_datetime 10 2 12 2 14 2 ":") ;; time
                )
                fileHandle
            )
            (close fileHandle)
        )
    )
    (princ)
)

Add a ref to your s::startup function, i.e.

Code: [Select]
(defun s::startup ( )

    ;; ...

    (MakeDwl)

    ;; ...

)

It will write out data to the dwl file like so (same as whohas.arx) --
Quote
CottageCGirl
PC90210
2005/05/26 13:27:38

While you could add reactor code to delete the dwl file on close / exit there's nothing wrong with leaving the dwl files on the server, to witt, they identify who edited the drawing last.

/HTHAL
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CottageCGirl

  • Guest
WHOHAS.lsp
« Reply #18 on: May 26, 2005, 03:54:06 PM »
Quote from: MP
Perhaps this will help
Thanks- very busy, will check it out later....... :crazy:

AfricaAD

  • Guest
WHOHAS.lsp
« Reply #19 on: June 01, 2005, 12:27:23 AM »
We use corporate licenses, & dwl's are created. It can be found at the same location as the file opened.