Has anyone had any issues with "CATPrtResultWithOutLink" to paste "AsResult" not working? I'm trying to paste a product into a newly created product but nothing gets pasted in. Using "CATPrtCont" to paste "As Specified In Part Document" results in an error.
here is a quick example code:
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim productDocument1 As Document
Set productDocument1 = documents1.Add("Product")
Dim product1 As Product
Set product1 = productDocument1.Product
product1.PartNumber = "MyNewProduct"
Dim oSel 'As Selection
Set oSel = CATIA.ActiveDocument.Selection
oSel.Add partCol.Item(i)
oSel.Copy
Dim newSel 'As Selection
Set newSel = productDocument1.Selection
newSel.Clear
newSel.Add product1
newSel.PasteSpecial "CATPRTResultwithoutlink"
'newSel.paste
'newSel.PasteSpecial "CATPrtResult"
'newSel.PasteSpecial "CATProdCont"
newSel.Clear
oSel.Clear
here is a quick example code:
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim productDocument1 As Document
Set productDocument1 = documents1.Add("Product")
Dim product1 As Product
Set product1 = productDocument1.Product
product1.PartNumber = "MyNewProduct"
Dim oSel 'As Selection
Set oSel = CATIA.ActiveDocument.Selection
oSel.Add partCol.Item(i)
oSel.Copy
Dim newSel 'As Selection
Set newSel = productDocument1.Selection
newSel.Clear
newSel.Add product1
newSel.PasteSpecial "CATPRTResultwithoutlink"
'newSel.paste
'newSel.PasteSpecial "CATPrtResult"
'newSel.PasteSpecial "CATProdCont"
newSel.Clear
oSel.Clear