08-25-2021
12:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-25-2021
12:37 AM
hello, thanks for response.
I managed to add sheet thickness, laser cut distance and bend radius to custom iproperties. But I still have a problem how to invoke count of bends and see this in parameters. Can anyone edit my rule below? this rule working good but it only showing count of bends and isnt adding this to parameters.
Thanks a lot
'access the active document Dim oDoc As Document oDoc = ThisApplication.ActiveDocument ' Set a reference to the active flat pattern. Dim oFlatPattern As FlatPattern oFlatPattern = oDoc.ComponentDefinition.FlatPattern Dim oBends As FlatBendResults oBends = oFlatPattern.FlatBendResults MessageBox.Show("FlatBendResults count: " & oBends.Count, "iLogic") Dim oAllBendEdges As EdgeCollection oTopFaceBendEdges = ThisApplication.TransientObjects.CreateEdgeCollection Dim oEdge As Edge Dim oEdges As Edges ' Get all Bend UP edges on top face 'True = Top Face oEdges = oFlatPattern.GetEdgesOfType _ (FlatPatternEdgeTypeEnum.kBendUpFlatPatternEdge, True) i = 0 For Each oEdge In oEdges i = i + 1 Next ' Get all Bend DOWN edges on top face 'True = Top Face oEdges = oFlatPattern.GetEdgesOfType _ (FlatPatternEdgeTypeEnum.kBendDownFlatPatternEdge, True) For Each oEdge In oEdges i = i + 1 Next MessageBox.Show("Top face bends count: " & i, "iLogic") ' Get all Bend UP edges on bottom face 'True = Bottom Face oEdges = oFlatPattern.GetEdgesOfType _ (FlatPatternEdgeTypeEnum.kBendUpFlatPatternEdge, True) i = 0 For Each oEdge In oEdges i = i + 1 Next ' Get all Bend DOWN edges on bottom face 'False = Bottom Face oEdges = oFlatPattern.GetEdgesOfType _ (FlatPatternEdgeTypeEnum.kBendDownFlatPatternEdge, False) For Each oEdge In oEdges i = i + 1 Next MessageBox.Show("Bottom face bends count: " & i, "iLogic")