乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 28|回复: 8

[编程交流] 有人能帮我做图片吗

[复制链接]

33

主题

77

帖子

44

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
165
发表于 2022-7-5 23:48:10 | 显示全部楼层 |阅读模式
我不知道如何让图像显示在对话框中。。。我已经从教程中学习了这段代码,但我不知道应该替换哪些部分。。。想知道是否有人能给我同样的代码,并在需要的地方插入幻灯片名称“bolt43.sld”?你能把插入的名字换成不同的颜色吗?提前谢谢你。
DCL:
  1. : image {
  2. key = "sld";
  3. height = 30;
  4. width = 30;  
  5.     color = 0;
  6. is_enabled = false;
  7. is_tab_stop = false;
  8. }
LSP:
  1. (setq mySlideName "c:/acad/myslide.sld")
  2. (setq myKey "sld")
  3. (upDateImage mySlideName myKey)
  4. (defun upDateImage(sldName key)         
  5. (setq width (dimx_tile key))
  6. (setq height (dimy_tile key))
  7. (start_image key)
  8. (fill_image 0 0 width height 0)
  9. (slide_image 0 0 width height sldName)
  10. (end_image)
  11. )
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-5 23:56:28 | 显示全部楼层
只需使用实际路径修改洋红色部分:
  1. (setq mySlideName [color=magenta]"c:/acad/myslide.sld"[/color])

 
请编辑您的帖子并添加代码标签。
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 00:05:31 | 显示全部楼层
 
我想知道你对OP的图像路径所做的更改!
 
如果图像放置在lisp文件中所示的正确路径中,则必须解决此问题。
 
DCL:
  1. DCL: dialog {
  2.    : image { key = "sld"; height = 30; width = 30; color = 0; is_enabled = false; is_tab_stop = false; }
  3.    ok_only;
  4.    }
回复

使用道具 举报

33

主题

77

帖子

44

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
165
发表于 2022-7-6 00:13:07 | 显示全部楼层
谢谢你们的回复,抱歉,但我仍然有trubs,我得到了错误:没有函数定义:UPDATEIMAGE。让我向你们展示我真正想要实现的——我正在尝试创建一个“细节生成器”,它将根据用户选择完成一个细节图。我正在尝试获取它,以便在图像区域显示与用户从第一个下拉列表中选择的vang匹配的幻灯片。这是我目前掌握的代码。。。
 
//DCL代码从这里开始
  1. LAD : dialog {
  2. aspect_ratio = 0;
  3. label = "VANG DETAIL CREATOR©";
  4. fixed_height = true;
  5. fixed_width = true;
  6. : boxed_column {
  7. : text_part {
  8. label = "--- SELECT DETAILS FOR VANG ---";
  9. alignment = centered;
  10. }
  11. : popup_list {
  12. key = "mylist1";
  13. label = "Type of Vang:";
  14. alignment = right;
  15. //fixed_width_font = true;
  16. width = 13;
  17. value = 0;
  18. }
  19. fixed_width = true;
  20. fixed_height = true;
  21. : image_button {
  22. alignment = top;
  23. fixed_width = true;
  24. fixed_height = true;
  25. key = "ddvp_image";
  26. width = 55;
  27. height = 5;
  28. color = 0;
  29. is_tab_stop = false;
  30. }
  31.   
  32.      : popup_list {
  33. key = "mylist2";
  34. label = "Center of Hole to Face:";
  35. alignment = right;
  36. //fixed_width_font = true;
  37. width = 10;
  38. value = 0;
  39. }
  40. : edit_box {   
  41.   key = "eb1";   
  42.   label = "Distance from Top of Pole:";   
  43.   width = 26;
  44.   fixed_width = true;   
  45.   value = "";
  46.   alignment = centered;   
  47. }   
  48.    : radio_row {
  49. : spacer {
  50. width = 1;
  51. height = 0.5;
  52. }
  53. : radio_button {
  54. label = "Single Sided";
  55. key = "B1";
  56. alignment = centered;
  57. }
  58. : radio_button {
  59. label = "Double Sided";
  60. key = "B2";
  61. value = "1";
  62. alignment = centered;
  63. }
  64.       }
  65.      }
  66.    : boxed_column {
  67. : row {
  68. : button {
  69. label = "OK";
  70. key = "Next";
  71. width = 16;
  72. fixed_width = true;
  73. mnemonic = "O";
  74. is_default = true;
  75. alignment = right;
  76. }
  77. : button {
  78. label = "Next";
  79. key = "next";
  80. width = 16;
  81. fixed_width = true;
  82. mnemonic = "N";
  83. is_default = true;
  84. alignment = right;
  85. }
  86. : button {
  87. label = "Cancel";
  88. key = "cancel";
  89. width = 16;
  90. fixed_width = true;
  91. mnemonic = "C";
  92. is_cancel = true;
  93. alignment = left;
  94.   }}
  95. }
  96. : text_part {   
  97. label = "_________________________________";
  98. alignment = centered;
  99. }
  100. }
  101. // DCL CODE ENDS HERE

由于某种原因,我的幻灯片文件显示无效,但这是可以制作幻灯片的dwg文件。
 
 
提前感谢您的帮助,感谢您的耐心!
004816xk25ajjchs9rh0fq.png
RV01-RV02。图纸
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
211
发表于 2022-7-6 00:25:41 | 显示全部楼层
请使用LosGirk代码标记
 
此外,您的帖子中缺少函数(fwtlogo)。
回复

使用道具 举报

33

主题

77

帖子

44

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
165
发表于 2022-7-6 00:30:32 | 显示全部楼层
好的,对不起,我已经知道了代码标签是什么,我一定做得不对,我不能让它们工作。我故意删除了徽标,忘记删除lisp中的调用。谢谢你的提示。
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 00:36:25 | 显示全部楼层
阅读此
.......
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
211
发表于 2022-7-6 00:42:53 | 显示全部楼层
 
奇怪的是,你删除了那个子,因为我们在这里帮助你的那部分代码。
回复

使用道具 举报

33

主题

77

帖子

44

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
165
发表于 2022-7-6 00:48:16 | 显示全部楼层
好的,pBe和Tharwat,对不起,伙计们,我的开始不好。我已经失业13年了,很多事情都回到了我的脑海,但也有很多新东西需要学习。再次感谢您的耐心。我已经做了研究,我想我准备再试一次。话虽如此:
这是原始代码,包括徽标功能和相应的DCL。这不是给我带来问题的标志,因为我知道如何显示向量。我的问题是我不知道如何让幻灯片显示出来。我知道这很愚蠢,但我想不出来!我总是会遇到错误:没有函数定义:UPDATEIMAGE。最后,我想要实现的是改变幻灯片图像,以反映用户在图像区域上方的下拉列表中选择的任何VAG类型(图1)。我希望我已经给了你们所需要的一切,你们很乐意帮助我,谢谢。
  1. LAD : dialog {
  2. aspect_ratio = 0;
  3. label = "VANG DETAIL CREATOR";
  4. fixed_height = true;
  5. fixed_width = true;
  6. : boxed_column {
  7. : text_part {
  8. label = "--- SELECT DETAILS FOR VANG ---";
  9. alignment = centered;
  10. }
  11. : popup_list {
  12. key = "mylist1";
  13. label = "Type of Vang:";
  14. alignment = right;
  15. //fixed_width_font = true;
  16. width = 13;
  17. value = 0;
  18. }
  19. fixed_width = true;
  20. fixed_height = true;
  21. : image_button {
  22. alignment = top;
  23. fixed_width = true;
  24. fixed_height = true;
  25. key = "ddvp_image";
  26. width = 55;
  27. height = 5;
  28. color = 0;
  29. is_tab_stop = false;
  30. }
  31.   
  32.      : popup_list {
  33. key = "mylist2";
  34. label = "Center of Hole to Face:";
  35. alignment = right;
  36. //fixed_width_font = true;
  37. width = 10;
  38. value = 0;
  39. }
  40. : edit_box {   
  41.   key = "eb1";   
  42.   label = "Distance from Top of Pole:";   
  43.   width = 26;
  44.   fixed_width = true;   
  45.   value = "";
  46.   alignment = centered;   
  47. }   
  48.    : radio_row {
  49. : spacer {
  50. width = 1;
  51. height = 0.5;
  52. }
  53. : radio_button {
  54. label = "Single Sided";
  55. key = "B1";
  56. alignment = centered;
  57. }
  58. : radio_button {
  59. label = "Double Sided";
  60. key = "B2";
  61. value = "1";
  62. alignment = centered;
  63. }
  64.       }
  65.      }
  66.    : boxed_column {
  67. : row {
  68. : button {
  69. label = "OK";
  70. key = "Next";
  71. width = 16;
  72. fixed_width = true;
  73. mnemonic = "O";
  74. is_default = true;
  75. alignment = right;
  76. }
  77. : button {
  78. label = "Next";
  79. key = "next";
  80. width = 16;
  81. fixed_width = true;
  82. mnemonic = "N";
  83. is_default = true;
  84. alignment = right;
  85. }
  86. : button {
  87. label = "Cancel";
  88. key = "cancel";
  89. width = 16;
  90. //fixed_width = true;
  91. is_cancel = true;
  92. //alignment = center;
  93.   }}
  94.      : column {
  95.   // : row {     
  96.    //: boxed_column {
  97. : text_part {   
  98. label = "_________________________________";
  99. alignment = centered;
  100. }
  101. : spacer {
  102. width = 8;
  103. height = 0.0;
  104. }
  105. : image {
  106. key = "FWTlogo";
  107. width = 11.00;// X = 42
  108. height = 2.46;// Y = 03
  109. fixed_width = true;
  110. fixed_height = true;
  111. aspect_ratio = 1;
  112. color = 135;
  113. alignment = centered;
  114.    }
  115. }   
  116.       }}
  1. 7

004824zz5qmym8kyk0de3f.jpg
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 22:01 , Processed in 1.181288 second(s), 72 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表