找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
打印 上一主题 下一主题

CAA问题

[复制链接]
11
发表于 2006-2-14 11:42:50 | 只看该作者
CATApplication.Subscribe用法如下:

o Subscribe
public int Subscribe( int                     iSubscribingType,
                               CATCommand*  iToClient,
                               void*                  iClientData,
                              void(*)()              UserStaticMethod)  

                Adds a transaction/idle subscription to a command.
Parameters:
iSubscribingType
               The subscribing type.
                Legal values: Can be set to CATSubscribeEndTransaction (=1) or to CATSubscribeIdle (=2)
iToClient
               The command to call with its UserStaticMethod
iClientData
               Data useful to UserStaticMethod
UserStaticMethod
              The method to call when the state defined by iSubscribingType is reached.
Returns:
              0 if the transaction/idle subscription is successfully added and 0 otherwise

我主要不知道那几个参数都写什么,返回值是哪个啊?

[ 本帖最后由 xinghesnak 于 2006-2-14 11:48 编辑 ]
12
发表于 2006-2-15 08:40:43 | 只看该作者
小弟发现不光selection.selectelement2报错,selectelement和selectelement3也同样报错,好像是只要是在VBA中交互式操作,用CAA调用就会报错......高手们帮忙啊!
13
发表于 2006-2-15 13:48:09 | 只看该作者
顶顶......^_^
14
发表于 2006-2-16 08:05:29 | 只看该作者
雄起!雄起!
15
发表于 2006-2-16 09:25:18 | 只看该作者
帮你顶顶,手头没环境

看看callback
16
发表于 2006-2-17 15:41:52 | 只看该作者
callback是什么东东?^_^
17
发表于 2006-2-20 08:03:35 | 只看该作者
还是要顶,真的没有人会吗?
18
发表于 2006-2-21 14:39:00 | 只看该作者
public int Subscribe( int                     iSubscribingType,
                               CATCommand*  iToClient,
                               void*                  iClientData,
                              void(*)()              UserStaticMethod)  

iSubscribingType: 1 or 2, you can try both
iToClient: pointer to your(?) command
iClientData: Do you want to pass some data to your command? if no, set it NULL; yes? pointer to your data.
UserStaticMethod: pointer to a method of your command which must be "static", this will be used as a callback. (so if some event happens, system will call this method, this is called "callback")

However I don't think you REALLY want to use this.
Better paste you VBA code and mark where the error occurs, and the error messsages.
So someone familiar with VBA could help you.

I don't think anybody here ever have chance to use this CATApplication::Subscribe().
19
发表于 2006-2-21 17:01:30 | 只看该作者
To saeba:Thank you very much!
VBA code and mark where the error occurs is:
Function GetPart(InfString As String, Optional Product As Product, Optional RootProduct As Product) As Part
          Dim TagPrduct, Status
          ReDim InputObjectType(0)
          InputObjectType(0) = "Product"
          LocSel.Clear
          Status = LocSel.SelectElement3(InputObjectType, "选择用来存放 " & InfString & " 的 Product:", False, CATMultiSelTriggWhenSelPerf, False)                                               *********错误的就是这行,就是屏幕选取受到限制
.........
end function

how to replace CATApplication::Subscribe() to the first parameter of CATUtilities::executescript()????
where is the return value of CATApplication::Subscribe()??

For example:The path of MyVBA projectis:"d:\1.catvba",two moudle:"11"and "22"--------"Sub main"
20
发表于 2006-2-21 18:55:01 | 只看该作者
what is the error message?

>我看CAA帮助说需要用 CATApplication.Subscribe 来返回第一个参数值
I don't understand why...
Could you paste this part of the document?

>how to replace CATApplication::Subscribe() to the first parameter of >CATUtilities::executescript()????
The first parameter of CATUtilities::executescript() is a UncodeString...
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-12-24 01:13 , Processed in 0.031322 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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