(VBScript)Copy & Paste Special Problem from Another Part Bodies
(VBScript)Copy & Paste Special Problem from Another Part Bodies
(OP)
Hello, All
I made the script to copy & paste special a body. It works very good only in same part.
I'd like to do from another part bodies.
Also I have no idea this : "Selected element(s) not allowed for this operation.".
Could you explain me what is wrong?
I recorded my problem and uploaded on Youtube.
Link to Youtube
I made the script to copy & paste special a body. It works very good only in same part.
I'd like to do from another part bodies.
Also I have no idea this : "Selected element(s) not allowed for this operation.".
Could you explain me what is wrong?
I recorded my problem and uploaded on Youtube.
Link to Youtube





RE: (VBScript)Copy & Paste Special Problem from Another Part Bodies
It would be great to see the code....probably you are referring in the code to a specific Body item (for example Body.2). Is very possible to not have same Item names in another part.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: (VBScript)Copy & Paste Special Problem from Another Part Bodies
But I'm sorry to not understand your reply.
Could you explain again with my script?
CODE --> VBScript
RE: (VBScript)Copy & Paste Special Problem from Another Part Bodies
You have to activate the target CATPart, after copying your body....
Set partDocument1 = documents1.Item("The_name_of_your_target.CATPart")
Dim editPart
Set editPart = partDocument1
CATIA.StartWorkbench("PrtCfg")
editPart.Activate()' '''''make the part active (highlight blue colour)
selection1.PasteSpecial "CATPrtResult" ' ----- Perform Paste As Result With Link
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: (VBScript)Copy & Paste Special Problem from Another Part Bodies
Thank you for your reply.
It works very well!!