I'm trying to write a little snipped of iLogic code to detect whether the sheetmetal part I am making has bends or not (we sometimes use the sheetmetal feature for flat plates with cutouts and such).
If a bend is detected, I would like one of my iProperties to change. Now I'm okay with that second part, but the bend detection has me stumped. I'm just not quite sure which API calls to make.
Any help is appreciated.
Solved! Go to Solution.
Solved by LukeDavenport. Go to Solution.
Hi icouture,
This should do it:
(It'll obviously error out if the current document is not a sheet metal part)
Dim BendCount As Integer = ThisApplication.ActiveEditDocument.ComponentDefinition.Bends.Count MessageBox.Show(BendCount, "Title")
Thank you. That worked. The only problem is I get a random error once in a while that I have not been able to reproduce reliably. I will look further into this.