Simple script help please
Simple script help please
(OP)
Hello all
I´m a complete beginner at scripting and I can't figure out this alone.
Can someone help me with a simple script please?
I just want to select a body and run the script.
This is what the script should do:
1- Copy the body you have pre-selected
2- Paste that body with link
3- Subtract that body from the active body
Do you understand what I´m looking for, can someone help me on this?
A simple script like this would speed up my work a LOT
Thank you
I´m a complete beginner at scripting and I can't figure out this alone.
Can someone help me with a simple script please?
I just want to select a body and run the script.
This is what the script should do:
1- Copy the body you have pre-selected
2- Paste that body with link
3- Subtract that body from the active body
Do you understand what I´m looking for, can someone help me on this?
A simple script like this would speed up my work a LOT
Thank you





RE: Simple script help please
so many example on this forum...
put some code here and I'll help - but i won't do it for you.
indocti discant et ament meminisse periti
RE: Simple script help please
Thank you for your reply.
My job doesn´t involve scripting, I just like to learn it whenever I can so that I can speed up my catia work.
I will post the code I have and maybe you can make it more abstract, because got it fomr macro recording.
Thanks so much
Paulo
RE: Simple script help please
RE: Simple script help please
Are you copying from one part and pasting to another part OR are you copy/pasting within the same part?
Since you are using "with link" I assume you are pasting between parts. Here is a VBA code off the top of my head...I did not test it, but hopefully it gives you some insight. Things that seem so simple to do manually are not so simple in code. A lot more error handling and maybe interactive selection would need to be added...but here is a thought starter.
CODE --> VBA