马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Image command from visual LISP?By Augusto Goncalves
To use the RELOAD, UNLOAD and DETACH options of the IMAGE command, it is not possible to use the AutoCAD ActiveX interface. Instead, you have to 'rebuild' these options using AutoLISP and Visual LISP functions.
-IMAGE RELOAD:
This command options works on the raster image definition object that is stored in the dictionary "ACAD_IMAGE_DICT". This object uses the DXFgroup code 280 as a 'loaded' flag. If the value of group code 280 is 1, the image file is currently loaded; if the value is 0, the image file is unloaded.
In order to get the correct entry in the image dictionary (to get the right image definition object) and set this flag to 1, use the IMAGERELOAD function (see below).
-IMAGE UNLOAD:
This command options uses the flag previously mentioned. Set the value of group code 280 to 0 to unload the image file. The function IMGUNLOAD does this.
-IMAGE DETACH:
This command options removes the specified image definition object and removes every raster image entity from the current drawing that uses the (deleted) image definition object. The IMGDETACH function does this.
You can use the following functions. They 'rebuild' the functionality of the IMAGE command options. The functions (imgreload), (imgunload) and (imgdetach) need the image name as a parameter. For the image name, use the AutoCAD wildcard mechanism. |