bestlc 发表于 2012-9-10 20:50:41

VB读取Aspen数值老是424错误

我的Aspen版本是2006.5,VB6.0
按照那个手册上的程序和实例去做的,但是一直出现“424要求对象”错误
错误显示在 Set ihColumn = ihAPSim.Tree.Data.Blocks.B6这一行

代码如下:
Private Sub Command5_Click()
'This example retrieves scalar variables from a block
Dim ihColumn As IHNode
Dim nStages As Long
Dim buratio As Double
'navigate the tree to the RADFRAC block
Set ihColumn = ihAPSim.Tree.Data.Blocks.B6
'get the number of stages
nStages = ihColumn.Input.Elements("NSTAGE").Value
'Get the boilup ratio
buratio = ihColumn.output.Elements("BU_RATIO").Value
MsgBox "Number of Stages is:" & nStages _
& Chr(13) & "Boilup Ratio is:" & buratio, , "GetScalarValuesExample"

End Sub

zhdgzhdg 发表于 2012-9-11 05:41:16

当引用对象属性或方法时,没有提供正确的对象限定符。很可能是ihAPSim没有申明。

sinopecgyf 发表于 2012-9-11 06:43:14

那个手册?可以问一下是那个手册吗
另外怎么样实现 aspen与excel或者hysys与excel之间的数据传递

飞梦101 发表于 2012-9-11 08:59:44

使用aspen simulation workbook工具就好了,excel最好使用03版本的,高版本ASW工具的兼容性不高

wangcup 发表于 2012-10-9 16:06:27

飞梦101 发表于 2012-9-11 08:59 static/image/common/back.gif
使用aspen simulation workbook工具就好了,excel最好使用03版本的,高版本ASW工具的兼容性不高

您好,想跟你学习一下aspen simulation workbook,不知道怎么联系您呢,我的邮箱wangcup@163.com,QQ:319883518,重谢!
页: [1]
查看完整版本: VB读取Aspen数值老是424错误