.NET

.NET

Reply
Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 11 of 11 (59 Views)

Re: Finding out when a custom PaletteSet is closed in AutoCAD using .NET code cr

08-13-2012 01:25 AM in reply to: yaqiz

The solution Kean posted on his blog has a few problems.

 

One is that he assumes that there is an active document to send a command to, which may not be the case since the PaletteSet could be visible in 'zero-document state' (e.g., there are no documents open). In that case, kaboom.

 

Another problem, which affects most kludges that involve sending strings to the command line, is that the command that closes the paletteset could be scripted by LISP, and what follows that could be a prompt from LISP requesting some input. Unfortunately, Kean's solution will send its command string to the command line while the LISP script is waiting for the user to type a response, and the command string ends up satisfying the input request.

 

You can avoid all of the nonsense related to that solution, by trying this one (and remember that you can't assume there is any open documents when a PaletteSet is closed):

 

     Getting notified when a PaletteSet is hidden/closed

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.