PDA

View Full Version : Display WHOHAS Dialog through automation



Marshal_Rosenberg60828
2004-06-01, 02:46 PM
Is there a way to run the WhoHas command for a particular file via Automation (or VB)?

richard.binning
2004-06-01, 03:05 PM
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

cll
2004-06-09, 06:26 AM
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

richard.binning
2004-06-10, 12:42 PM
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

cll
2004-06-11, 08:13 AM
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.

jwanstaett
2004-06-11, 08:34 PM
try this


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