iCAx开思网

标题: 请教,CATIA VB开发下,获取当前装配体的问题 [打印本页]

作者: CCxiao    时间: 2010-10-12 09:34
标题: 请教,CATIA VB开发下,获取当前装配体的问题
想设置一个按钮,移动当前装配体下的一个物体cube
可运行到第二句 CATIA.ActiveDocument   就出现问题,请高手帮忙解答一下,非常感谢

Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument    ’运行不下去了
Dim product1 As Product
Set product1 = productDocument1.Product
Dim products1 As Products
Set products1 = product1.Products
Dim product2 As Product
Set product2 = products1.Item("cube.1")
Dim move1 As Move
Set move1 = product2.Move
Set move1 = move1.MovableObject
Dim arrayOfVariantOfDouble1(11)
arrayOfVariantOfDouble1(0) = 1#
arrayOfVariantOfDouble1(1) = 0#
arrayOfVariantOfDouble1(2) = 0#
arrayOfVariantOfDouble1(3) = 0#
arrayOfVariantOfDouble1(4) = 1#
arrayOfVariantOfDouble1(5) = 0#
arrayOfVariantOfDouble1(6) = 0#
arrayOfVariantOfDouble1(7) = 0#
arrayOfVariantOfDouble1(8) = 1#
arrayOfVariantOfDouble1(9) = 10
arrayOfVariantOfDouble1(10) = 10
arrayOfVariantOfDouble1(11) = 0#
Set move1Variant = move1
move1Variant.Apply arrayOfVariantOfDouble1




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3