peterbeamish1
Automotive
- Aug 16, 2013
- 13
Hello,
I need to copy a partbody from an instance of a product to another product. How might I go about this?
Copying:"Removal : male"
to
"55227-8#K813 Male Plate.CATPart"
syntax may not be perfect, looking for code on how to access specific instances. copying from the document as a whole seems to give an error.
What do you recommend?
THANK YOU VERY MUCH IN ADVANCE!
Peter
CODE:
for i=1 to cavNumb
cavdesign = "55227 Cavity Design." + i
Set product3 = products2.Item(cavdesign) 'loop this
Set products3 = product3.Products
Set product4 = products3.Item("55227 Male Cavity.1")
'ERROR IS IN HERE I THINK
set product4 = product4.parts
set myPart = product4.part
set DerBODIES = myPart.Bodies
' ^i have no idea how to access an instance of a product
Set theBody = theBodies.Item("Removal : male")
selection1.add theBody
Set partDocument2 = documents1.Item("55227-8#K813 Male Plate.CATPart")
Set part2 = partDocument2.Part
selection2.Add part2
selection2.Paste
next
I need to copy a partbody from an instance of a product to another product. How might I go about this?
Copying:"Removal : male"
to
"55227-8#K813 Male Plate.CATPart"
syntax may not be perfect, looking for code on how to access specific instances. copying from the document as a whole seems to give an error.
What do you recommend?
THANK YOU VERY MUCH IN ADVANCE!
Peter
CODE:
for i=1 to cavNumb
cavdesign = "55227 Cavity Design." + i
Set product3 = products2.Item(cavdesign) 'loop this
Set products3 = product3.Products
Set product4 = products3.Item("55227 Male Cavity.1")
'ERROR IS IN HERE I THINK
set product4 = product4.parts
set myPart = product4.part
set DerBODIES = myPart.Bodies
' ^i have no idea how to access an instance of a product
Set theBody = theBodies.Item("Removal : male")
selection1.add theBody
Set partDocument2 = documents1.Item("55227-8#K813 Male Plate.CATPart")
Set part2 = partDocument2.Part
selection2.Add part2
selection2.Paste
next