"Xnotifytime" less than one minute?
Hi there,
is it possible to get a time less than one minute?
Comments
-
This is a complaint I'm getting more common from my users as well, I was hoping v18 would address it. I would think setting it to 0 would mean "instantly" which is how Autocad performs. It needs whole numbers unfortunately, I've tried throwing a decimal in there.
Does anybody have any work around? I expect this isn't high on Bricsys' to do list.
Thanks!
0 -
@Chris Schildmeier:
Please try the attached Lisp code. After (almost) every command and whenever the document becomes current, all loaded xrefs are checked and modified files are reloaded. Depending on the quality of the network and the number of xrefs there may be a noticeable delay however.0 -
Interesting. AutoCAD has the same environment variable (XNOTIFYTIME), with the same options (Whole number from 1 to 10080).
Yet AutoCAD notifies you immediately when an xref is changed (saved), regardless of the setting, or even existence of the environment variable XNOTIFYTIME.Ref: http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-3DE106E0-95E7-493C-9C03-8EA2BB6FA90C
Yes, I agree, BricsCAD should offer the option to be notified immediately.
0 -
Roy, thank you very much for the lisp - you saved my day !
0 -
@DrJan:
Thanks for confirming that the code works. I am glad you find it useful.0 -
Hi Roy,
However lisp occasionally stops working. I am not sure, why. Restrating BC helps although due to amount of drwaings opened not always possible (to much time). Is there a way to recall it manually (by command i.e.?). Brics CAD has got reload all command (I made a button) bu it is not good since it turns out every unloade xref. So your list - reloading only changed ones is much better solution.0 -
@DrJan:
Here is a new version of BKG_ReloadXrefs. As requested it has a command to (re)start the application (BKG_ReloadXrefs_Start). Also there is a command to stop the application (BKG_ReloadXrefs_Stop). And the handling of missing xref files has been improved.If you are interested in debugging the problem you have encountered, remove the first semicolon on this line:
; (print "BKG_ReloadXrefs_CallBack") ; Remove the first semicolon for debugging.
If you then load the application you will see the text "BKG_ReloadXrefs_CallBack" in the Command Bar after every command. This indicates that the application is working. When this text no longer appears something has interrupted the program.0 -
@Roy Klein Gebbinck
Many thanks, I am reloading the lisp and give it a try!0 -
One thing, command doestn't work: Unable to recognize command "BKG_RELOADXREFS_START". This error can occur when the command is not supported for the active license."
However there is one command active: : BKG_RELOADXREFS_RELOAD0 -
@DrJan:
Please verify that you are loading the last version. The file size is ca. 5k. The version (20180615) is indicated in the header of the file.0 -
@Roy Klein Gebbinck
My apologies, obviously I have copied an old file. Thank you.0 -
@Roy Klein Gebbinck
Actually, the lisp stopped working, actually it is present but doesn't reload saved xrefs. I have removed the semicolon and see the command "BKG_ReloadXrefs_CallBack" present all the time however no reloading. I have replace my file, closed BC and reopened. Nothing helps.
Cheers.
J.0 -
@DrJan:
I'll try to look into this later this week.
Are you saying that code has worked properly for more than 3 months and has suddenly failed quite recently? With certain drawings? With certain paths?0 -
Well, it stopped working after a 2-3 weeks. Maybe earlier. However I didn't have time to post here and didn't want to bother, but since the project has gorwn over the time and we have dozens of xrefs to reload I missed the lisp... Anyway if you don't have time to look over and possibly our lan enviroment is the issue ... I can live without it.
We work on a Synology external server maybe it is the issue. It seems after some time the lisp is "chocked" and stops working.
No errors pop up so I am not sure where to look for a culprict.
Thank you for your time BTW.
Cheers.0 -
@DrJan: Here is a new version of the code.
I have added some variables and a couple of functions.
The most important new command function is BKG_ReloadXrefs_Test. This command will display a small report and suggest values for the *BKG_ReloadXrefs_systimeDelay* and *BKG_ReloadXrefs_actionInterval* variables. These variables have to be changed in the Lisp file (lines 20 and 21) and the Lisp file needs to be reloaded after that.
The command function BKG_ReloadXrefs_VerboseModeOn will switch Command Bar messages ON. Its counterpart BKG_ReloadXrefs_VerboseModeOff does the opposite.
The end conclusion may very well be that your network does not support an XNOTIFYTIME of less than one minute. Conferring with your IT person/department may be a good idea.
0 -
I recently had a request from a user to make a tool to reload all xrefs that had changed.
I looked into it, here is the thread:
https://forums.autodesk.com/t5/net/how-to-tell-if-xref-is-out-of-date-and-needs-reloading/m-p/8064176
You might think the two items marked as solution are actual solutions, but it turns out acad only updates the XrefNotificationStatus of a document at intervals based on XREFNOTIFY time. So that is not good enough.
The answer is to pinvoke the acedXrefNotifyCheckFileChanged function, to force a check.
I do not know if that function is in the Bricscad brx API.
There is another way though, you could make a tool in .net that uses the filesystemwatcher object. You just tell it to watch the xrefs, and report when any change size or date modified. I have used that object for several tools, one watches a text file that is a log written to from another program.
When the text file changes, it reads the lines to report what is going on. That way when a program like acad/bcad goes into "no screen display update" during a long operation, I can still see what its doing. Also if acad crashes the status stays shown and you know what happened last.
I'm just saying it works if one takes that approach.0 -
the test shows results as following:
"Could not retrieve the systime of the first xref "0 -
On the other hand the lisp has just worked a while ago on a fresh created DWG layout file, however a smaller one - only 3 xrefs instead of 5 as above. I am a bit confused.
0 -
@DrJan:
In a dwg where the problem occurs is there a difference between the 'Saved path' and the 'Found path' of the xrefs?0 -
Yes, in our working DWGs we use relative path i.e. ".\0016_AR_XREF_3205.dwg" and found path is a full one "Y:\XXX\02_Projekty\0016\PROJEKT WYKONAWCZY\Rysunki DWG\0016_AR_XREF_3205.dwg" - we use relative path because when copied to a laptop for a design meeting on a site (where our office network is unavailable) all xrefs are found.
So I doublechecked and the issue occurs only when the path differs (fullstopis used).0 -
@DrJan:
Thank you for testing and helping to clear this up.
There were indeed problems with relative paths if BricsCAD was not started by double-clicking a file in the drawing folder. Also the fact that BC will always search for missing files in the drawing folder was not taken into account.Attached is a new version of the code.
0 -
@DrJan:
Thanks. Mind you: the Lisp is not perfect. The search order for xrefs does not quite match the built-in search order. In the code attached to this message this has been fixed. Several other, minor, improvements are included as well.0 -
Thank you again! No one is perfect but at the end of the day the lisp is very useful expecially when working on many files at the same time.
AutoCAD in our office doesn't have reloading xref issue as BC, to access BC xref menu I have to open another window so it takes time and effort. The lisp makes work a bit easier.
Cheers0