Code freezes when adding a RuledSurfaceFeature but does not freeze when stepping through
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all!
I'm having trouble adding a RuledSurfaceDefinition to RuledSurfaceFeatures. I make a list of ruledSurfaceDefinitions and then I use a foreach loop to add each one to the RuledSurfaceFeatures. It always adds the first one no problem and then it throws an error when it tries to add the next one. This doesn't happen all the time though. Sometimes the code runs fine and others times it freezes when it tries to add the second one. It also works fine if I put a breakpoint on the foreach loop and step through it. I'm repeating this on the same part so everything is the same each time. Thoughts?
RuledSurfaceFeatures rsf = oCompDef.Features.RuledSurfaceFeatures;
foreach(RuledSurfaceDefinition rsd in ruledSurfaceDefinitionList)
{
rsf.Add(rsd);
}