Jump to content

Is this possible with LISP?


Andrew1979

Recommended Posts

A friend of mine said his boss often opens up drawings as read-only, does some work, then realises he can't save to the file. Of course he could save as and muck around that way but the question was "is there a way to make a pop-up message appear if the drawing is read-only?"

 

So, I put the question towards you clever people out there of how this could be achieved.....if at all.

 

Thanks

Link to comment
Share on other sites

That is odd, The words "Read-only" appears on the top of the autocad window session as a suffix to the file name.

 

Pop-up message can be achieved with a reactor [save].

 

command: save [qsave]

Reactor checks the drawing status. ReadOnly

IF -1 or :vlkax-true then message pops up

 

EDIT: Are you wanting the pop-up message to appear even before the user starts working on the drawing? I'm guessing the a pop-up message is needed if the drawing session is idle for a couple of minutes. is that how you envisioned a program to work?

Link to comment
Share on other sites

thanks for the info. Yeah his boss isn't that computer savy and misses the basic things by sound of it.

 

Yeah I was hoping that as soon as the program opened a pop would come up if it was read only.

 

One way I thought was to simply assign something to say the line command so as soon as he tried to add anything it would pop up a message. This isn't ideal though as he might just be stretching or moving objects.

Link to comment
Share on other sites

thanks for the info. Yeah his boss isn't that computer savy and misses the basic things by sound of it.

 

Yeah , a lot them bosses are like that. :lol:

 

Yeah I was hoping that as soon as the program opened a pop would come up if it was read only.

 

Strange, Autocad does have that feature, Autocad Alert.... with a big X inside a RED DOT

 

One way I thought was to simply assign something to say the line command so as soon as he tried to add anything it would pop up a message. This isn't ideal though as he might just be stretching or moving objects.

 

If you were to take the Reactor route, i would suggest "Zoom" for command reactor. almost always, a user starts with that. [me thinks]

Link to comment
Share on other sites

thanks, thats a great idea about the zoom. And yes, I vaguely remember years ago opening an AutoCAd drawing and an alert coming up about read-only....must be a setting somewhere that might turn that off.

Link to comment
Share on other sites

As a default if you open a dwg that is set to read only or open by someone else a big message appears asking "do you want to continue" ? Does the BOSS just ignore this ?

 

Using a reactor as previously mentioned you could do a saves as adding the boss's login (getenv "username") as the name and auto save. Plus all sorts of other checks ie saves as dwg-boss-2, dwg-boss-3 3rd time opened.

Link to comment
Share on other sites

well its my friends boss but I have wondered the same. I did notice though that if you open an AutoCAD drawing as read only through AutoCAD no message comes up. So I'm not sure if he is doing that or, as you said, just ignoring the prompt. I think more questions need to be asked to what he is doing and how he is opening drawings to see where the problem lies. It may be a more simple solution to better education of how to go about things.

 

Thanks for the tips on reactor too

Link to comment
Share on other sites

...adding the boss's login (getenv "username") as the name and auto save. Plus all sorts of other checks ie saves as dwg-boss-2, dwg-boss-3 3rd time opened.

 

Brilliant idea using the "username" Bigal, for some reasons the Boss does ignore the Autocad Alert warning, and another thing , the notification is somehow disabled [beats me how that happened], So granting all those are true [or a fact], the purpose is to prevent the Bosses from doing anything even before they realized that the file is in Read-only mode via invoking save.

 

I guess the reasoning for this is to avoid creating multiple copies of a drawing file, so saveas is out of the question. Like i said, i'm just guessing :lol:

 

Perhaps a dwg-reactor <:vlr-begindwgopen> s enough [granting the alert notification is disabled

Link to comment
Share on other sites

By the way if you have AutoCAD 2014 or later then there should be a lock icon on the drawing tab if it is opened read only. I've attached a screenshot below. If you have an earlier version of AutoCAD you can download the drawing tabs program from the following link:

https://apps.exchange.autodesk.com/ACD/Detail/Index?id=adn.exchange.autodesk.com:Drawing-Tabs:en

 

On the other hand I do like where this thread is heading. I wouldn't mind having an routine that will give you an option of saving a copy with your username and date stamp prefix. I've never got around to programming in lisp with reactors before as I haven't had the need/time to learn. However it's interesting me enough to look into it in a bit more depth :-)

 

Capture.JPG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...