Instantiate PowerCopy in CATIA V5R19 using VBA macros

前端 未结 1 756
离开以前
离开以前 2021-01-26 18:18

I cant figure out how to instantiate Power-copy using VBA macro. I have a CATPart1, that have Power-copy name \"MyPC\". And I want to instantiate this power-copy in current Part

1条回答
  •  太阳男子
    2021-01-26 19:03

    There are two things that may be the cause of the error you are having:

    1 - Use

    Dim InstFactory As InstanceFactory
    Set InstFactory = part1.GetCustomerFactory("InstanceFactory")
    

    instead of

    Dim InstFactory As InstanceFactory
    Set InstFactory = part1.HybridShapeFactory
    

    2 - You need to activate the floating license KT1 in order to use the PowerCopy operation via API. To activate it, go to Catia menu -> Tools -> Options and then select the tab Shearable Products and active the license.

    0 讨论(0)
提交回复
热议问题