Catia macro for moving a part
Catia macro for moving a part
(OP)
Hi,
I am new to vba and catia scripting and i have to create a macro that moves a part from one place to another,
more specificly i need the function of the move activity in vba.(the parameters doesn't matter so much just an idea because i am stuck)
Thanks a lot,
Chris
I am new to vba and catia scripting and i have to create a macro that moves a part from one place to another,
more specificly i need the function of the move activity in vba.(the parameters doesn't matter so much just an idea because i am stuck)
Thanks a lot,
Chris





RE: Catia macro for moving a part
Dim prod1 As Product
Set prod1 = CATIA.ActiveDocument
Set prodInd = prod1
Dim moveArray(11)
moveArray(0)=1
moveArray(1)=0
moveArray(2)=0
moveArray(3)=0
moveArray(4)=1
moveArray(5)=0
moveArray(6)=0
moveArray(7)=0
moveArray(8)=1
moveArray(9)=1000 'translates component 1000 x direction of parent's coordinate space
moveArray(10)=0
moveArray(11)=0
prodInd.Move.Apply moveArray
http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com
RE: Catia macro for moving a part
I don't know if the names (prod1 etc) are imortant to the code syntax.
Also when running this exact macro at a process with 2 products, there is an errorQ Object doesn't support this property or method 'prodInd.move'
RE: Catia macro for moving a part
Set dummy = ProdInd
dummy.Move.Apply moveArray
http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com
RE: Catia macro for moving a part
I was new to macros and now i understand what you meant.
I actually want to create an array which consists of the products of the PPR tree
and move them.
I am working on it but if you have any idea it would be very helpful.
Regards