03-14-2017
04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-14-2017
04:27 AM
Hi Rikard,
A little modification in the code. Please find the modified code in the following.
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 nonPrmFeatures As NonParametricBaseFeatures = oPartDef2.Features.NonParametricBaseFeatures
Dim nonprmFea As NonParametricBaseFeature = nonPrmFeatures.Item(1)
nonprmFea.Redefine(oSourceBody)
oAssemblyDoc.Update
Please feel free to contact if there is any doubt.
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
