iLogic - Access Surface Bodies

iLogic - Access Surface Bodies

Anonymous
Not applicable
1,758 Views
2 Replies
Message 1 of 3

iLogic - Access Surface Bodies

Anonymous
Not applicable

Hello there,

 

I'm trying to catch all the surface bodies in my part. But i can only catch the solid bodies.

I tried a simple version of the rule that i found here: http://inventortrenches.blogspot.be/2013/01/ilogic-solid-body-visibility.html

 

What do I need to change in order to catch the names of the Surface Bodies instead of the Solid Bodies?

 

My browser layout:

Surfaces.png

 

My Code:

Dim oCompDef as ComponentDefinition
oCompDef = ThisDoc.Document.ComponentDefinition


'define the solidbody
Dim oBody As SurfaceBody
Dim i As Integer
i = 1

For Each SurfaceBody In oCompDef.SurfaceBodies
oBody = oCompDef.SurfaceBodies.Item(i)

MsgBox(oBody.Name)

i = i +1
Next
0 Likes
Accepted solutions (1)
1,759 Views
2 Replies
Replies (2)
Message 2 of 3

CAD_CAM_MAN
Advocate
Advocate
Accepted solution

Maybe like this?...

         For Each SurfaceBody In CompDef.WorkSurfaces
            oBody = oCompDef.WorkSurfaces.Item(i).SurfaceBodies.Item(1)
            MsgBox(oBody.Name)
            i = i + 1
        Next
Message 3 of 3

Anonymous
Not applicable

Thanks! small diffrence big change!

0 Likes