Lisp function to Insert image via drag and drop into Bricscad drawing
In AutoCAD when you drag and drop an image into the drawing a lisp function will be triggered named ImageFile.
I can change this routine to my own needs.
How does Bricscad handles drag and drop images into the drawing? Can I change it to my own needs?
0
Comments
-
If you drag and drop an image file the _IMAGEATTACH command is called. Redefining that command should be possible.0
-
Scratch that. It is not going to work.
The command is called as:
(COMMAND "._IMAGEATTACH" ...)
Meaning the un-redefined command is always used.
I believe the command should be called as:
(COMMAND "_IMAGEATTACH" ...)
But somehow there must be a Lisp function at work here... I can't find the file though.0 -
AutoCAD defines the ImageFile routine in the acaddoc.lsp or acadxxxxdoc.lsp, which loads with every drawing it loads.So is there a similar doc.lsp used with Bricscad?0
-
BricsCAD supports start up Lisp files. The file names are on_doc_load.lsp and on_start.lsp. But these files are not part of the default installation.0
-
Is there any way to include IMAGEATTACH in a lisp routine and force it to use the dialog box?
If I type the command name I always get the dialog box.
But when I include it in a (COMMAND) function I always get a command line prompt for "Image name: "
I've tried it with and without prefixes,and with various settings for FILEDIA and CMDDIA.0 -
With other commands using the initdia function does the trick, but not with IMAGEATTACH.
I suggest you use the getfiled function.0 -
Oops... Anthony, scratch my suggestion regarding the use of getfiled. This is not just about selecting the file, you want the full 'Attach Raster Image' dialog.0
This discussion has been closed.