Results 1 to 6 of 6

Thread: Display WHOHAS Dialog through automation

  1. #1
    Login to Give a bone
    0

    Default Display WHOHAS Dialog through automation

    Is there a way to run the WhoHas command for a particular file via Automation (or VB)?

  2. #2
    Administrator richard.binning's Avatar
    Join Date
    2015-12
    Location
    In the foothills of the appalachians
    Posts
    2,260
    Login to Give a bone
    0

    Talking Re: Display WHOHAS Dialog through automation

    Quote Originally Posted by Marshal_Rosenberg
    Is there a way to run the WhoHas command for a particular file via Automation (or VB)?
    Most of the Automation methods will result in the file being opened read only if the file is already opened.

    You could check for a "dwl" file with the same name and display that data when found...an example shown below.

    RLBINNIN
    H132890-L
    Tuesday, June 01, 2004 11:01:07 AM

  3. #3
    Member
    Join Date
    2002-05
    Posts
    47
    Login to Give a bone
    0

    Default Re: Display WHOHAS Dialog through automation

    Quote Originally Posted by richard.binning
    Most of the Automation methods will result in the file being opened read only if the file is already opened.

    You could check for a "dwl" file with the same name and display that data when found...an example shown below.

    RLBINNIN
    H132890-L
    Tuesday, June 01, 2004 11:01:07 AM

    Sorry, but I can't find the example mentioned. Could you please advise me?

    Regards
    Claus Lauesen

  4. #4
    Administrator richard.binning's Avatar
    Join Date
    2015-12
    Location
    In the foothills of the appalachians
    Posts
    2,260
    Login to Give a bone
    0

    Default Re: Display WHOHAS Dialog through automation

    Are you loading the whohas routine automatically? If it is correctly loaded, every drawing that gets opened will create a matching file with the DWL extension. You could simply grab the existing file name, swap the extension from DWG to DWL and use your favorite programming language to read the text based file. That is what is shown in my reply above. The first line is the Login name, the second line is the Computer name, the last is the Date and time of the last access.

    RLB

  5. #5
    Member
    Join Date
    2002-05
    Posts
    47
    Login to Give a bone
    0

    Default Re: Display WHOHAS Dialog through automation

    Maybe I have not made myself clear.
    When you in your reply June 01 says: "...an example shown below", I expected ex. a code for the method in question.
    But in your reply June 01 I can't find any code, thats all.

  6. #6
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Display WHOHAS Dialog through automation

    try this
    Code:
    Dim myDrawing As String
    myDrawing = "c:\path\filename.dwl"
    'use your drawing name
    If Dir(myDrawing, 3) <> "" Then
      MsgBox "File is locked"
      'add code to open and read
      'mydrawing file to see who as it locked
    End If

Similar Threads

  1. Display Representation Automation??
    By pauljordan in forum AMEP General
    Replies: 0
    Last Post: 2011-02-17, 01:30 AM
  2. LMan dialog box does not display
    By emodderman in forum AutoCAD General
    Replies: 8
    Last Post: 2007-06-12, 01:34 PM
  3. Dialog Box Display And Size
    By CADdancer in forum VBA/COM Interop
    Replies: 3
    Last Post: 2006-01-12, 04:23 PM
  4. mtext dialog box display
    By david_peterson in forum ACA General
    Replies: 4
    Last Post: 2005-04-12, 02:59 PM
  5. NEW and OPEN dialog box won't display
    By Maverick91 in forum AutoCAD General
    Replies: 4
    Last Post: 2004-08-06, 11:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •