明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1760|回复: 7

重新上传(一个AutoCAD2000开发小例子)

[复制链接]
发表于 2003-10-22 09:41:00 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2003-10-23 10:13:23 编辑

(一个AutoCAD2000开发小例子) 重新上传

  解决了meflying提出的版本冲突问题,在创建AutoCAD实例对象时应加版本号:
  
      Public AcadApp As AcadApplication

      Set AcadApp = CreateObject("Autocad.application.15")
  
  谢谢meflying版主和mccad.

                                  Oct 22, 2003
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2003-10-22 09:51:00 | 显示全部楼层
什么意思,我装了2004和2000,它告诉我说没有装2000,却给我运行了两个2004的属性框,莫名其妙:

本帖子中包含更多资源

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

x
发表于 2003-10-22 10:55:00 | 显示全部楼层
高手!!!
发表于 2003-10-22 12:15:00 | 显示全部楼层
请问王版主:
怎样把图标.bmp建立成.dll文件,并运用这个.dll文件???
帮帮忙……
 楼主| 发表于 2003-10-22 12:24:00 | 显示全部楼层

回复

本帖最后由 作者 于 2003-10-22 12:46:27 编辑

启动一下AutoCAD 2000后关闭,在执行acad_demo.exe,

要么把acad_demo.exe重新编译一下试试,重新引用一下AutoCAD 2000的类型库.

好象安装了多个版本,用VB激活AutoCAD时, 有时不能启动正确版本...
 楼主| 发表于 2003-10-22 12:34:00 | 显示全部楼层

回复

按以下步骤(转载), 把编译的dll和你的mnu文件放在同一路径下,名称相同(不知是否一定).

If you have several bitmaps associated with a menu, you can save disk space and avoid those annoying smiley faces by compiling your graphics into a dll. Here's how:

1.  Start a new ActiveX DLL project
2.  In the Project Explorer window, right click "roject1" and select "roject1 Properties"
3.  In the Project Name edit box, enter the name of your mnu file. Press OK
4.  Select Add-Ins | Add-In Manager
5.  Select the VB6 Resource Editor
6.  In the Load Behavior section (lower right), select "Loaded". Press OK
7.  You now have a new toolbar button (the green cubes with a hand on them). Press it
8.  Use the "Add Bitmap" button to add your bitmaps (the cactus)
9.  Be sure to rename them, then save and close.
10. Compile the DLL and place it the same folder as your menu

Remember, small bitmaps are 16x15. No point in making large icons since AutoCAD will only scale the small ones. To use the bitmaps, simply call them by name in your button defintions:

[_Button("Hide all", "HIDEALL", "HIDEALL")]^C^C<your macro here>

Also, be aware that Win9x  limits the number of bitmaps you can store in a dll. NT does not suffer from this limitation.

资源:
二个联接网址: http://www.afralisp.com/links.htm
                    http://code.acadx.com/
                    的Code专区How to do...? 的 Visual Basic可以找到.
发表于 2003-10-22 14:00:00 | 显示全部楼层
谢谢!!!
 楼主| 发表于 2003-10-22 21:05:00 | 显示全部楼层

回复

抱歉,我在创建AutoCAD实例时没有加版本号(CreateObject函数).刚问过mccad.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-10-2 14:29 , Processed in 0.168232 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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