Delete Surface Anybody knows How?

Delete Surface Anybody knows How?

Anonymous
Not applicable
492 Views
2 Replies
Message 1 of 3

Delete Surface Anybody knows How?

Anonymous
Not applicable

Hi,

 

I have a surface called "RevolutionSfr1" in my part and this i want to delete?

 

I tried the code below but it does not work.

 

Does anybody knows how to call and delete a surface if you know the name of the surface.

 

Dim oSurFaces As WorkSurfaces

oSurFaces = oPartdoc.ComponentDefinition.WorkSurfaces

Dim oSurFace As WorkSurface

oSurFace = oSurFaces.Item("RevolutionSrf1")

oSurFace.Delete

 

Please Help.

 

Regards Kent boettger

 

0 Likes
493 Views
2 Replies
Replies (2)
Message 2 of 3

YuhanZhang
Autodesk
Autodesk

Delete the part feature which the work surface depends on would delete the work surface. Try below code:

 

Dim oSurFeature As RevolveFeature
Set oSurFeature = oPartDoc.ComponentDefinition.Features.RevolveFeatures("RevolutionSrf1")

oSurFeature.Delete

 



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank You, This was just what i needed..Smiley Happy

 

Regards.

 

Kent Boettger

0 Likes