Message 1 of 4
For statement issue processing Solid Bodies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I am attempting to navigate through the solid bodies in a part to set each body's sheet metal style. The body names are contained in a list named oBodynames. The code matches a body name to a surface body and then changes the sheet metal style. I run into an issue in the code after it processes the first style change. From what I can tell the For statement loses its definition and fails to process the rest of the Bodies.
For Each oBody As SurfaceBody In oBodies For Each oBodyname As SurfaceBody In oBodyNames If oBody.Name = oBodyName Try oCompDef.SetBodySheetMetalStyle(oBody, oStyle) Logger.Info("********Processed " + oBodyName) Catch Logger.Info("!!!!!!!!!!!Failed!! " + oBodyName) End Try Exit For End If Logger.Info("+++++++++ NOT Found " + oBodyName) Next Next