LosGirk 发表于 2022-7-5 23:48:10

有人能帮我做图片吗

我不知道如何让图像显示在对话框中。。。我已经从教程中学习了这段代码,但我不知道应该替换哪些部分。。。想知道是否有人能给我同样的代码,并在需要的地方插入幻灯片名称“bolt43.sld”?你能把插入的名字换成不同的颜色吗?提前谢谢你。
DCL:

: image {
key = "sld";
height = 30;
width = 30;
    color = 0;
is_enabled = false;
is_tab_stop = false;
}LSP:

(setq mySlideName "c:/acad/myslide.sld")
(setq myKey "sld")
(upDateImage mySlideName myKey)
(defun upDateImage(sldName key)         
(setq width (dimx_tile key))
(setq height (dimy_tile key))
(start_image key)
(fill_image 0 0 width height 0)
(slide_image 0 0 width height sldName)
(end_image)
)

MSasu 发表于 2022-7-5 23:56:28

只需使用实际路径修改洋红色部分:
(setq mySlideName "c:/acad/myslide.sld")
 
请编辑您的帖子并添加代码标签。

Tharwat 发表于 2022-7-6 00:05:31

 
我想知道你对OP的图像路径所做的更改!
 
如果图像放置在lisp文件中所示的正确路径中,则必须解决此问题。
 
DCL:

DCL: dialog {
   : image { key = "sld"; height = 30; width = 30; color = 0; is_enabled = false; is_tab_stop = false; }
   ok_only;
   }

LosGirk 发表于 2022-7-6 00:13:07

谢谢你们的回复,抱歉,但我仍然有trubs,我得到了错误:没有函数定义:UPDATEIMAGE。让我向你们展示我真正想要实现的——我正在尝试创建一个“细节生成器”,它将根据用户选择完成一个细节图。我正在尝试获取它,以便在图像区域显示与用户从第一个下拉列表中选择的vang匹配的幻灯片。这是我目前掌握的代码。。。
 
//DCL代码从这里开始
LAD : dialog {
aspect_ratio = 0;
label = "VANG DETAIL CREATOR©";
fixed_height = true;
fixed_width = true;
: boxed_column {

: text_part {
label = "--- SELECT DETAILS FOR VANG ---";
alignment = centered;
}

: popup_list {
key = "mylist1";
label = "Type of Vang:";
alignment = right;
//fixed_width_font = true;
width = 13;
value = 0;
}
fixed_width = true;
fixed_height = true;
: image_button {
alignment = top;
fixed_width = true;
fixed_height = true;
key = "ddvp_image";
width = 55;
height = 5;
color = 0;
is_tab_stop = false;
}

   : popup_list {
key = "mylist2";
label = "Center of Hole to Face:";
alignment = right;
//fixed_width_font = true;
width = 10;
value = 0;
}
: edit_box {   
key = "eb1";   
label = "Distance from Top of Pole:";   
width = 26;
fixed_width = true;   
value = "";
alignment = centered;   
}   

   : radio_row {
: spacer {
width = 1;
height = 0.5;
}
: radio_button {
label = "Single Sided";
key = "B1";
alignment = centered;
}
: radio_button {
label = "Double Sided";
key = "B2";
value = "1";
alignment = centered;
}
      }
   }
   : boxed_column {
: row {
: button {
label = "OK";
key = "Next";
width = 16;
fixed_width = true;
mnemonic = "O";
is_default = true;
alignment = right;
}
: button {
label = "Next";
key = "next";
width = 16;
fixed_width = true;
mnemonic = "N";
is_default = true;
alignment = right;
}
: button {
label = "Cancel";
key = "cancel";
width = 16;
fixed_width = true;
mnemonic = "C";
is_cancel = true;
alignment = left;
}}
}
: text_part {   
label = "_________________________________";
alignment = centered;
}
}
// DCL CODE ENDS HERE
由于某种原因,我的幻灯片文件显示无效,但这是可以制作幻灯片的dwg文件。
 
 
提前感谢您的帮助,感谢您的耐心!

RV01-RV02。图纸

pBe 发表于 2022-7-6 00:25:41

请使用LosGirk代码标记
 
此外,您的帖子中缺少函数(fwtlogo)。

LosGirk 发表于 2022-7-6 00:30:32

好的,对不起,我已经知道了代码标签是什么,我一定做得不对,我不能让它们工作。我故意删除了徽标,忘记删除lisp中的调用。谢谢你的提示。

Tharwat 发表于 2022-7-6 00:36:25

阅读此
.......

pBe 发表于 2022-7-6 00:42:53

 
奇怪的是,你删除了那个子,因为我们在这里帮助你的那部分代码。

LosGirk 发表于 2022-7-6 00:48:16

好的,pBe和Tharwat,对不起,伙计们,我的开始不好。我已经失业13年了,很多事情都回到了我的脑海,但也有很多新东西需要学习。再次感谢您的耐心。我已经做了研究,我想我准备再试一次。话虽如此:
这是原始代码,包括徽标功能和相应的DCL。这不是给我带来问题的标志,因为我知道如何显示向量。我的问题是我不知道如何让幻灯片显示出来。我知道这很愚蠢,但我想不出来!我总是会遇到错误:没有函数定义:UPDATEIMAGE。最后,我想要实现的是改变幻灯片图像,以反映用户在图像区域上方的下拉列表中选择的任何VAG类型(图1)。我希望我已经给了你们所需要的一切,你们很乐意帮助我,谢谢。
LAD : dialog {
aspect_ratio = 0;
label = "VANG DETAIL CREATOR";
fixed_height = true;
fixed_width = true;
: boxed_column {

: text_part {
label = "--- SELECT DETAILS FOR VANG ---";
alignment = centered;
}

: popup_list {
key = "mylist1";
label = "Type of Vang:";
alignment = right;
//fixed_width_font = true;
width = 13;
value = 0;
}
fixed_width = true;
fixed_height = true;
: image_button {
alignment = top;
fixed_width = true;
fixed_height = true;
key = "ddvp_image";
width = 55;
height = 5;
color = 0;
is_tab_stop = false;
}

   : popup_list {
key = "mylist2";
label = "Center of Hole to Face:";
alignment = right;
//fixed_width_font = true;
width = 10;
value = 0;
}
: edit_box {   
key = "eb1";   
label = "Distance from Top of Pole:";   
width = 26;
fixed_width = true;   
value = "";
alignment = centered;   
}   

   : radio_row {
: spacer {
width = 1;
height = 0.5;
}
: radio_button {
label = "Single Sided";
key = "B1";
alignment = centered;
}
: radio_button {
label = "Double Sided";
key = "B2";
value = "1";
alignment = centered;
}
      }
   }
   : boxed_column {
: row {
: button {
label = "OK";
key = "Next";
width = 16;
fixed_width = true;
mnemonic = "O";
is_default = true;
alignment = right;
}
: button {
label = "Next";
key = "next";
width = 16;
fixed_width = true;
mnemonic = "N";
is_default = true;
alignment = right;
}

: button {
label = "Cancel";
key = "cancel";
width = 16;
//fixed_width = true;
is_cancel = true;
//alignment = center;
}}


   : column {
// : row {   
   //: boxed_column {
: text_part {   
label = "_________________________________";
alignment = centered;
}
: spacer {
width = 8;
height = 0.0;
}
: image {
key = "FWTlogo";
width = 11.00;// X = 42
height = 2.46;// Y = 03
fixed_width = true;
fixed_height = true;
aspect_ratio = 1;
color = 135;
alignment = centered;
   }
}   
      }}

7
页: [1]
查看完整版本: 有人能帮我做图片吗