iCAx开思工具箱

标题: 【求助】在catia中如何获得用户选择句柄 [打印本页]

作者: suilj    时间: 2004-8-25 16:59
标题: 【求助】在catia中如何获得用户选择句柄
套用“句柄”一词
实际是这样的
想获得用户选择的点或线的几何信息,如坐标等
用宏,vb
作者: acoka    时间: 2004-8-25 17:01
看来你不要底层的VC的用法
作者: suilj    时间: 2004-8-25 17:02
没办法,我的caa一直不能用
项目时间紧
就只好凑合用vb了
作者: acoka    时间: 2004-8-25 17:11
IUnknown
  |
  +--IDispatch
    |
    +--CATBaseUnknown
      |
      +--CATBaseDispatch
        |
        +--AnyObject
          |
          +--HybridShape
            |
            +--Point
              |
              +--HybridShapePointCoord
   
  
--------------------------------------------------------------------------------
  
Point defined by coordinates.
Role: To access data of the point feature created with its cartesian coordinates.  
See also:  
Length  
See also:  
Reference  
See also:  
HybridShapeFactory  
  
--------------------------------------------------------------------------------
  
Property Index
PtRef  
Returns or Sets the reference point for PointCoord feature.  
X  
Returns X coordinate of the point.  
Y  
Returns Y coordinate of the point.  
Z  
Returns Z coordinate of the point.
作者: acoka    时间: 2004-8-25 17:13
Line (Object)
IUnknown
  |
  +--IDispatch
    |
    +--CATBaseUnknown
      |
      +--CATBaseDispatch
        |
        +--AnyObject
          |
          +--HybridShape
            |
            +--Line
   
  
--------------------------------------------------------------------------------
  
--------------------------------------------------------------------------------
  
Method Index
GetDirection  
Role: Returns the unit-vector pointing in the direction of the line.  
GetOrigin  
Role: Returns the origin of the line  
PutDirection  
Role: Sets the unit-vector pointing in the direction of the line.  
PutOrigin  
Role: Sets the origin of the line.
作者: suilj    时间: 2004-8-25 18:14
HybridShapePointCoord  
Line  
这些我找到了
对于已知点线可以处理
我不知道怎样解决这个问题
我加载一个窗口
提示用户捡取几何
此时用户选点或线
程序得到这个点的坐标即HybridShapePointCoord  
但我怎么知道是哪个点阿
作者: acoka    时间: 2004-8-25 19:36
GetAlias()之类的
作者: suilj    时间: 2004-8-25 20:09
呵呵
谢谢
明天试试
家里机器没装
作者: suilj    时间: 2004-8-26 11:02
谢谢acoka
用的是
selection.findobject
所有问题迎刃而解
  
好爽阿~~~~~~~~~~~~
作者: suilj    时间: 2006-12-4 19:19
原帖由  于 2004-8-25 17:01 发表
看来你不要底层的VC的用法



哈哈,扛了两年,还是回到VC的路上来了,好像又晚了,是不是已经开始向.net转了?




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3