找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 654|回复: 3

[求助] [求助]:DCL对话框中如何调用幻灯库中的幻灯片文件

[复制链接]
发表于 2004-11-2 16:32:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
因DCL对话框需要调用幻灯片,这些幻灯片已被编译为幻灯库文件,请问在LISP中该如何调用幻灯库中的幻灯片?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2004-11-2 20:21:03 | 显示全部楼层
Creating Images  




The calling sequence to create images for image tiles and image buttons is similar to the list-handling sequence. The start_image function begins the creation of an image, and end_image ends it. However, the type of image to draw is specified in separate function calls, instead of arguments:

vector_image

Draws a vector (a single, straight line) in the current image.

fill_image

Draws a filled rectangle in the current image.

slide_image

Draws an AutoCAD slide in the image.

Vectors and filled rectangles are useful for simple images, such as the color swatches (filled rectangles) that the AutoCAD Select Color dialog box uses to display the user's choice of color. For complicated images, slides are more convenient. However, displaying slides can be time-consuming. If you use slides, keep them simple.

Note  If you use slides with filled objects (such as wide polylines, solids, and 3D faces) in image tiles, the images will appear as outlines unless you make the slides from an image created with the SHADEMODE command.

The vector_image function requires that you specify absolute coordinates, while fill_image and slide_image require that you specify a starting coordinate along with a relative width and height. To do this correctly you must know the exact dimensions of the image tile or image button. Because these dimensions are usually assigned when the dialog box is laid out, the PDB feature provides functions that return the width and height of a particular tile. These dimension functions are dimx_tile and dimy_tile. You should call them before you begin creating an image. The origin of a tile, (0,0), is always the upper-left corner.

Colors can be specified as AutoCAD color numbers or as one of the logical color numbers shown in the following table. (The values and mnemonics are defined by the Autodesk Device Interface [ADI].) Dialog box color attribute  

Color number
ADI mnemonic
Meaning

–2
BGLCOLOR
Current background of the AutoCAD graphics screen

–15
DBGLCOLOR
Current dialog box background color

–16
DFGLCOLOR
Current dialog box foreground color (for text)

–18
LINELCOLOR
Current dialog box line color



In the following example, "cur_color" is an image tile you want to fill entirely with a patch of red as follows:

(setq width (dimx_tile  "cur_color")
      height (dimy_tile "cur_color"))
(start_image "cur_color")
(fill_image 0 0 width height 1)   ;1 = AutoCAD red.
(end_image)
You can use the image-drawing functions in conjunction with each other. The following code fills an image and then draws a vertical stripe over it:

(setq width (dimx_tile "stripe")
      height (dimy_tile "stripe"))
(start_image "stripe")
(fill_image 0 0 width height 3)  ;3 = AutoCAD green.
(setq x (/ width 2))             ;Center the vector vertically.
(vector_image x 0 x height 4)    ;4 = AutoCAD cyan.
(end_image)
[B]The slides you display with slide_image can be standalone slide (SLD) files, or part of a slide library (SLB) file. If the slide is in an SLD file, you specify its name without the .sld extension (for example, "frntview"). If the slide is in a slide library, you specify the name of the library, followed by the name of the slide enclosed in parentheses. Note that the library and slide names are also specified without extensions—for example, "allviews(frntview)". The slide_image function searches for the slide or slide library file according to the current AutoCAD library search path. (See load in the AutoLISP Reference.) [/B]

In the following example, the slide is in a single file called topview.sld:

(setq x (dimx_tile "view")
      y (dimy_tile "view"))
(start_image "view")
( slide_image 0 0 x y "topview")
(end_image)
Vectors in slides are often drawn in white (color number 7), which is the default background color of an image. If your image tile is blank when you first display a slide, try changing its color attribute to graphics_background. (You can also change the background of the image by preceding the slide_image call with a fill_image call.)
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-11-2 21:27:50 | 显示全部楼层
多谢aidraft  的指点:)
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2004-11-3 07:20:45 | 显示全部楼层
呵!这样,谢了
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2025-9-27 13:48 , Processed in 0.301721 second(s), 38 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表