jmarkus
Mechanical
- Jul 11, 2001
- 377
I am using the following code to copy and past a geometric set from one part to another:
This results in an empty geometric set. If I use
(instead of "paste result"), then CATIA complains "INTERNAL ERROR IN MECHANICAL MODELER".
If I manually copy/paste it works fine. What is the trick to making the CATScript behave like the manual copy/paste?
Thanks,
Jeff
Code:
sel.Add HybridBodies1.Item(i)
sel.Copy
Set documents2 = CATIA.Documents
Set partDocument2 = documents2.Add("Part")
partDocument2.Product.PartNumber = HybridBodyName(i)
Set partDocument2 = CATIA.ActiveDocument
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set part2 = partDocument2.part
sel.Add part2
sel.Paste ("CATPrtResult")
This results in an empty geometric set. If I use
Code:
sel.Paste
If I manually copy/paste it works fine. What is the trick to making the CATScript behave like the manual copy/paste?
Thanks,
Jeff