Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Power copy 3DX2018

Status
Not open for further replies.

Max_995

Aerospace
Jul 31, 2019
1
DE
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top