Adding multiple RuledSurfaceFeatures throws error
- 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. I have no problem adding the first one but then I get 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);
}