Detecting the presence of bends

Detecting the presence of bends

Anonymous
Not applicable
359 Views
2 Replies
Message 1 of 3

Detecting the presence of bends

Anonymous
Not applicable

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.

0 Likes
Accepted solutions (1)
360 Views
2 Replies
Replies (2)
Message 2 of 3

LukeDavenport
Collaborator
Collaborator
Accepted 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")


Message 3 of 3

Anonymous
Not applicable

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.

0 Likes