Surfacebody from enumerator

Surfacebody from enumerator

WillyPoelmans3643
Participant Participant
426 Views
1 Reply
Message 1 of 2

Surfacebody from enumerator

WillyPoelmans3643
Participant
Participant

Hello,

 

I want to get the triangle-data of a surfacebody and in VBA I can succesfully use code like : 

 

oComponentDefinition.SurfaceBodies.Item(count)

 

But in C# I only can get an IEnumerator from surfacebodies.

I have looked arround how to do this but without success.

 

Does anyone have an example how to load the .SurfaceBodies.getEnumerator() into an IEnumerator?

 

Thanks

Willy

0 Likes
427 Views
1 Reply
Reply (1)
Message 2 of 2

WillyPoelmans3643
Participant
Participant

It's clear that I better catch up some sleep Smiley Happy

 

I didn't have System.Collections in the using statements so therefore C# didn't know about IEnumerator.

Simply adding this line solved the issue.

 

IEnumerator oSurfBodies = oCompOcc.SurfaceBodies.GetEnumerator();

works well.

 

Willy

 

0 Likes