dcl-Form-Close gives me an error. It doesn't seems to close the Form.
See attachments for a simple lsp, odcl and dwg I try to insert in the drawing.
Regards Jaco Romkes
Calling (command) from your button event handler fails because at that point the form is not yet closed and the command processor is not available. Move the (command) call to the main function immediately after (dcl-Form-Show) and it should work as you expect.
Thanks for your answer.
It worked like this in AutoCAD 2014, the latest version I have been using. I have a few routines where I call the (command) right after the dcl-Form-Close and they all work fine in 2014 and before. There seems to be a change in this for AutoCAD 2015 and 2016.
I have to change a little bit of code.
Jaco
AutoCAD 2015 eliminated fibers, so everything must now execute on the same fiber. In previous releases you could usually get away with this, but even then it is not guaranteed to work.