BUG REPORT | Ilogic Sheetmetal

L.R20
Contributor

BUG REPORT | Ilogic Sheetmetal

L.R20
Contributor
Contributor

Hi,

 

I have a problem with a Rule detecting the bends in a sheetmetal part. In some sheetmetal parts, the Rule cannot detect the bendlines, although they are visible in flatpattern view of the sheetmetal part.

 

Even a simple Rule like below can’t detect the bendlines in some cases.

 

Dim oDoc As Document = ThisApplication.ActiveDocument

Dim oSMD As SheetMetalComponentDefinition = oDoc.ComponentDefinition

Dim BendCount As Integer = oSMD.Bends.Count

MsgBox(BendCount)

 

However, using FlatBendResult Object does work. But this way I can’t get the coördinates of the start and end points of the bend lines.

 

Included in the zip file: The used Rule and a Sheetmetal part which bendlines are not detected by the given Rule.

The function of the Rule in the zip file is to create holes at the start and end points of the bend lines displayed in flatpattern view.

 

Inventor info:

Autodesk Inventor Professional 2016

64-Bit Edition

Build: 236, Release: 2016.2.2 - Date: Mon 10/10/2016

 

OS info:

Windows 10 Pro

Version: 1703

OS Build: 15063.413

System Type: 64-bit operating system, x64-based processor

0 Likes
Reply
369 Views
3 Replies
Replies (3)

S_May
Mentor
Mentor

Hello @L.R20

You can test this rule please (inventor 2016), dxf from iam, possibly is the ok.?

 

'get DXF target folder path
oFolder = oPath & "\" & oAsmName & " DXF Files"
'Check for the DXF folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolder) Then
System.IO.Directory.CreateDirectory(oFolder)
End If
'- - - - - - - - - - - - -
'- - - - - - - - - - - - -Component - - - - - - - - - - - -
'look at the files referenced by the assembly
Dim oRefDocs As DocumentsEnumerator
oRefDocs = oAsmDoc.AllReferencedDocuments
Dim oRefDoc As Document
'work the the drawing files for the referenced models
'this expects that the model has been saved
For Each oRefDoc In oRefDocs
iptPathName = Left(oRefDoc.FullDocumentName, Len(oRefDoc.FullDocumentName) - 3) & "ipt"
'check that model is saved
If(System.IO.File.Exists(iptPathName)) Then
Dim oDrawDoc As PartDocument
oDrawDoc = ThisApplication.Documents.Open(iptPathName, True)
oFileName = Left(oRefDoc.DisplayName, Len(oRefDoc.DisplayName))
Try
'Set the DXF target file name

Try
CustomName =iProperties.Value(oFileName, "Custom", "PF_PRT_ZNR")
Catch
CustomName ="XXX" 'Wert, wenn iPropertie PF_PRT_ZNR nicht existiert
End Try

oDataMedium.FileName = oFolder & "\" & CustomName  & " " & oFileName & ".dxf"

Dim oCompDef As SheetMetalComponentDefinition
oCompDef = oDrawDoc.ComponentDefinition
If oCompDef.HasFlatPattern = False Then
oCompDef.Unfold
Else
oCompDef.FlatPattern.Edit
End If
Dim sOut As String
sOut = "FLAT PATTERN DXF?AcadVersion=2004&OuterProfileLayer=IV_OUTER_PR​OFILE"
oCompDef.DataIO.WriteDataToFile( sOut, oDataMedium.FileName)
'just for check its works coretcly
'i=MessageBox.Show(oDataMedium.FileName, "Title",MessageBoxButtons.OKCancel)
'MessageBox.Show(i,"title",MessageBoxButtons.OK)
'If i=2 Then
'Exit Sub
'End If
oCompDef.FlatPattern.ExitEdit
Catch
End Try
oDrawDoc.Close
Else
End If
Next
0 Likes

L.R20
Contributor
Contributor

Hi,

 

Thanks for the help, but this is not what I'm looking for. I just want to get the coördinates of the start and end points of bend lines in a flatpattern. The Rule I posted works, but Inventor simply does not detect the bendlines in some cases (although the bendlines are placed/visible).

0 Likes

S_May
Mentor
Mentor
0 Likes