找回密码
 加入
搜索
查看: 2389|回复: 4

[AU3基础] Autoit与AutoCAD VBA之间的数据传递

[复制链接]
发表于 2014-12-2 22:11:34 | 显示全部楼层 |阅读模式
写的一个AutoCAD的小程序,需要结合Autoit与AutoCAD VBA,但是需要在这两个程序之间传递参数。
我现在想的是利用.ini文件进行读写来传递,下面是百度上找到的一段然后修改了一下的代码:
Dim strIniFile As String
strIniFile = "C:\AutoCAD VBA to Autoit\parameter.ini"

Dim strSection As String
strSection = "Application"

Dim strKey As String
strKey = "Version"

Dim strValue As String
strValue = "1.0.30"

Call IniUtil.WriteIntoIni(strIniFile, strSection, strKey, strValue)
strValue = IniUtil.ReadFromIni(strIniFile, strSection, strKey, "")


不知道为什么最后两句提示运行有错误424,要求对象。
这个要怎么改?有没有更好的办法呢?
发表于 2014-12-2 22:39:44 | 显示全部楼层
你这个 Iniutil明显就是一个对象吗,对象你new一个才行啊。
 楼主| 发表于 2014-12-2 23:22:54 | 显示全部楼层
你这个 Iniutil明显就是一个对象吗,对象你new一个才行啊。
MicroBlue 发表于 2014-12-2 22:39


那这个应该怎么改才行?参考的是下面这个
http://sywxnq.blog.163.com/blog/static/150755639201162813420131/
是不是CAD就不支持这个函数呢?对CALL这个用法不熟悉
发表于 2014-12-3 08:21:18 | 显示全部楼层
第一句是写配置文件,第二句是读取配置文件的吧,你直接用au3的方式读写试一下先
发表于 2014-12-5 09:08:50 | 显示全部楼层
前来学习。。。。。。。。。。。。。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-11 13:18 , Processed in 0.084438 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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