Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
rikard.nilsson
1021 Views, 19 Replies

Problem with redefine surface

Hi,

 

I have an assembly where I try with iLogic to redefine a surface.

But I get an error message that says that "it's not implemented yet" on my Redefine-row..

 

Does anyboby have an idea what I'm doing wrong?

 

Regards

Rikard

 

 

Dim oAssemblyDoc As AssemblyDocument = ThisApplication.ActiveDocument

    Dim oAssemblyDef As AssemblyComponentDefinition = oAssemblyDoc.ComponentDefinition

    Dim oOccurrence1 As ComponentOccurrence = Component.InventorComponent("CopyObject2_1")
    Dim oPartDef1 As PartComponentDefinition= oOccurrence1.Definition

    Dim oOccurrence2 As ComponentOccurrence = Component.InventorComponent("CopyObject1")
    Dim oPartDef2 As PartComponentDefinition = oOccurrence2.Definition


    Dim oSourceBody As SurfaceBody = oPartDef1.Worksurfaces.Item(1).Surfacebodies(1)


    Dim oSourceBodyProxy As SurfaceBodyProxy
    oOccurrence1.CreateGeometryProxy(oSourceBody, oSourceBodyProxy)


    Dim oCollection As ObjectCollection= ThisServer.TransientObjects.CreateObjectCollection
    oCollection.Add(oSourceBodyProxy)

    
    Dim nonPrmFeatures As NonParametricBaseFeatures = oPartDef2.Features.NonParametricBaseFeatures 
    Dim nonprmFea As NonParametricBaseFeature = nonPrmFeatures.Item(1)

    nonprmFea.Redefine(oCollection)


    oAssemblyDoc.Update