Dim oPart As Part
Set oPart = CATIA.ActiveEditor.ActiveObject
Dim factory As InstanceFactory
Set factory = oPart.GetCustomerFactory("InstanceFactory")
factory.BeginInstanceFactory "Power_Inst_Test", "3sh_546876498", "A.1"
factory.BeginInstantiate
Dim FirstPlane As Object
Set FirstPlane = oPart.FindObjectByName("Plane.2")
Dim AxisOrigin As Object
Set AxisOrigin = oPart.FindObjectByName("Axix System.1/Origin")
Dim SecondPlane As Object
Set SecondPlane = oPart.FindObjectByName("yz plane")
factory.PutInputData "FirstPlane", FirstPlane
factory.PutInputData "AxisOrigin", AxisOrigin
factory.PutInputData "SecondPlane", SecondPlane
Dim Instance As ShapeInstance
Set Instance = factory.Instantiate
factory.EndInstantiate
factory.EndInstanceFactory
oPart.Update
End Sub
I am trying to call a powercopy to active object.
Can anyone help? I am getting error at the highlighted area
Thanks in advance.
Set oPart = CATIA.ActiveEditor.ActiveObject
Dim factory As InstanceFactory
Set factory = oPart.GetCustomerFactory("InstanceFactory")
factory.BeginInstanceFactory "Power_Inst_Test", "3sh_546876498", "A.1"
factory.BeginInstantiate
Dim FirstPlane As Object
Set FirstPlane = oPart.FindObjectByName("Plane.2")
Dim AxisOrigin As Object
Set AxisOrigin = oPart.FindObjectByName("Axix System.1/Origin")
Dim SecondPlane As Object
Set SecondPlane = oPart.FindObjectByName("yz plane")
factory.PutInputData "FirstPlane", FirstPlane
factory.PutInputData "AxisOrigin", AxisOrigin
factory.PutInputData "SecondPlane", SecondPlane
Dim Instance As ShapeInstance
Set Instance = factory.Instantiate
factory.EndInstantiate
factory.EndInstanceFactory
oPart.Update
End Sub
I am trying to call a powercopy to active object.
Can anyone help? I am getting error at the highlighted area
Thanks in advance.