ilogic - contour roll

ilogic - contour roll

DominiqueBernardi5116
Contributor Contributor
588 Views
2 Replies
Message 1 of 3

ilogic - contour roll

DominiqueBernardi5116
Contributor
Contributor

Good Afternoon,

I'm trying to retrieve values from a contour roll feature, and I'm wondering how to get (with iLogic) the value shownon the pic bellow.

 

coutur_roll.JPG

Thanks a lot

 

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

JelteDeJong
Mentor
Mentor
Accepted solution

in the ContourRollFeature i did not see anything about the values that you are looking for. i dont think that there is a direct way to do this.  But you can isolate the ContourRollFeature and then get the flatpattern length. try this:

Dim doc As PartDocument = ThisApplication.ActiveDocument
Dim docDef As SheetMetalComponentDefinition = doc.ComponentDefinition
Dim features As SheetMetalFeatures = docDef.Features
Dim roll As ContourRollFeature = features.ContourRollFeatures.Item(1)

' suppress all feature except the ContourRollFeature
For Each f As PartFeature In features
    If (f.Name.Equals(roll.Name) = False) Then
        f.Suppressed = True
    End If
Next

If (docDef.HasFlatPattern = False) Then
    docDef.Unfold()
    docDef.FlatPattern.ExitEdit()
End If

Dim length As Double = docDef.FlatPattern.Length * 10
Dim width As Double = docDef.FlatPattern.Width * 10 

' unsuppress all features
For Each f As PartFeature In features
    f.Suppressed = False
Next

MsgBox(length & "mm x " & width & "mm")

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 3

DominiqueBernardi5116
Contributor
Contributor

Very helpfull

thx a lot

BR

0 Likes