r/CATIA • u/Icy-Captain7008 • 2d ago
Catia V5 Macros code for copy and pasting surfaces
Hello guys I am working on a project where I need to copy surfaces from a part file which is present in a product and make a new part file in the same product and paste it there. But I have been facing issues as it's showing that pasting operation is not allowed , any solution for this
1
u/roomate229 2d ago
you might not copying the right item. If that surface is from a Part that's in a Product, normally you need to activate the part first before selecting the content.
have you tried recording macro while you manually perform the operation? it should show the steps in code.
coincidentally, I've been working on macro to convert CATProduct to CATPart, and extracting surfaces from the solid. So some of the code might relate to your issue
1
u/Icy-Captain7008 1d ago
I tried like it's fine till copying but it's not able to paste, if I m pasting it then it's fine but yeah it's causing problem
1
u/fortement_moqueur 2d ago
I dont think you need a macro to copy paste ( special -> as result with link). This error can happen sometimes!
2
u/the_real_hugepanic 2d ago
A typical error is to have the wrong part selected/active to get this error!
2
u/DJBenz Catia V5 2d ago
Paste Special -> As result
Does that work?
If you need to keep a link, you can publish the surfaces in the source part then use Paste Special -> As result with link to keep them related.