以梦为马,不负韶华

搜索
查看: 1825|回复: 0
收起左侧

VB读取Aspen数值老是424错误

[复制链接]
发表于 1970-1-1 08:00:00 显示全部楼层 |阅读模式
20韶华币
我的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

发表于 1970-1-1 08:00:00 显示全部楼层
当引用对象属性或方法时,没有提供正确的对象限定符。很可能是ihAPSim没有申明。
回复

使用道具 举报

发表于 1970-1-1 08:00:00 显示全部楼层
那个手册?可以问一下是那个手册吗
另外怎么样实现 aspen与excel或者hysys与excel之间的数据传递
回复

使用道具 举报

发表于 1970-1-1 08:00:00 显示全部楼层
使用aspen simulation workbook工具就好了,excel最好使用03版本的,高版本ASW工具的兼容性不高

点评

您好,想跟你学习一下aspen simulation workbook,不知道怎么联系您呢,我的邮箱wangcup@163.com,QQ:319883518,重谢!  详情 回复 发表于 2012-10-9 16:06
回复

使用道具 举报

发表于 1970-1-1 08:00:00 显示全部楼层

您好,想跟你学习一下aspen simulation workbook,不知道怎么联系您呢,我的邮箱wangcup@163.com,QQ:319883518,重谢!

点评

在马火炮化工交流群里,可以找到我  发表于 2012-10-9 21:19
回复

使用道具 举报

不想打字就选择快捷回复吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|以梦为马,不负韶华

GMT+8, 2025-2-14 01:19

Powered by 以梦为马,不负韶华

© 2024-2099 Meng.Horse

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