SpassString = SysS.Print("Release the reference document")Īt this step appears an error factory.BeginInstanceFactory "SurfacicHoles", "C:\PowerCopyReference.CATPart" SpassString = SysS.Print("End of Instantiation") Set param2 = factory.GetParameter("Radius2") Set param1 = factory.GetParameter("Radius1") SpassString = SysS.Print("Modify Parameters") Set SecondHole = PartDest.FindObjectByName("Point.2")įactory.PutInputData "FirstHole", FirstHoleįactory.PutInputData "SecondHole", SecondHole Set Support = PartDest.FindObjectByName("Surface.1") Set FirstHole = PartDest.FindObjectByName("Point.1")
SpassString = SysS.Print("Begin Instantiation") SpassString = SysS.Print("BeginInstanceFactory")įactory.BeginInstanceFactory "SurfacicHoles", "C:\PowerCopyReference.CATPart" Set factory = PartDest.GetCustomerFactory("InstanceFactory") SpassString = SysS.Print("Retrieve the factory of the current part")
' "Retrieve the factory of the current part" Set PartDocumentDest = CATIA.ActiveDocument SpassString = SysS.Print("Retrive the current part") Set CATIA = GetObject(, "CATIA.Application") ' 2 published parameters: Radius1 and Radius2 ' 3 inputs: FirstHole, Support,and SecondHole ' SurfacicHoles is stored in the CATPart "e:\tmp\PowerCopyReference.CATPart" ' Instantiation of a PowerCopy Reference "SurfacicHoles" Similar problem I have found in this subject, and in his case it works. Unfortunately it doesn't work (I have made small modifications). I would like to create macro for power copy.