Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia macro for moving a part

Status
Not open for further replies.

chrismech91

Nuclear
Feb 21, 2013
6
GR
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
 
Replies continue below

Recommended for you

The Move object is used to perform transformations on child components by using a twelve member variant array.

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

-
 
Thank you for the instant reply.
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'
 
It's ok sorry for your time!
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top