Copy Part CATIA macro

Copy Part CATIA macro

Have you ever needed to Copy Part more times? For example when you have more instances of same Part? In this post I’ll show you how to make Copy Part CATIA macro for this operation. 



First of all almost in every model there are more instances of the same Part. So how do you make those instances and constraints for them? Are you doing it manually? Well if you do, certainly there is better and faster way for that. Hence let’s write some code for that action. 


That was just simple code of copy Part CATIA macro for one instance of selected part. You can also use for loop to make more instances, just one or two lines of code. 

If selected part has constraints you can copy that constraints or not.

assembly constraints

Furthermore here in options tab you can change these options. For example, now it’s enabled copy instances without the assembly constraints. So if you run previous copy Part CATIA macro, and your main part has constraints, they will not be copied. 

You can change these options with macro too.

So this code is to enable copy without constraints. We need this when we want to create constraints with macro. If they are also copied we have two constraint for same instance. All of these options you can record with a macro. 

Also you can add constraints on those instances. 

We make Fix constrain. For example, you can make any type of constraint. But if you don’t know how you can always record it. All inputs and declarations in this code are made from that first selection. 

Therefore user just need to select that fir part and we will define it all based on it. So you can just add this second code to the first one and get full macro. 

Finally if you need to copy part with brake link, you can do it with this code:

If you have any issues feel free to contact me.

Read more tutorials here or download free macros here.

Leave a Reply

Your email address will not be published. Required fields are marked *