05-22-2022
01:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-22-2022
01:44 PM
The original ilogic rule works . There was some feature looping which is likely not being used so I removed that. Are you running this rule in the factory file?
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oDef As SheetMetalComponentDefinition = oDoc.ComponentDefinition Dim oPartMember As iPartMember For Each oTab As iPartTableRow In oDef.iPartFactory.TableRows MessageBox.Show(oTab.MemberName, "Name of the Member") iPart.ChangeRow("", oTab.MemberName) If oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then If oDef.HasFlatPattern = False Then oDef.Unfold Else oDef.FlatPattern.Edit End If Dim odxf As String Dim oPath As String oPath = ThisDoc.Path & "\DXF" If Not System.IO.Directory.Exists(oPath) Then System.IO.Directory.CreateDirectory (oPath) End If Dim odxfname As String odxf = "FLAT PATTERN DXF?OuterProfileLayer=0&OuterProfileLayerColor=0;0;0&InteriorProfilesLayer=0&InteriorProfilesLayerColor=0;0;0&BendDownLayerLineType=37633&BendDownLayerColor=0;0;255&BendUpLayerLineType=37633&BendUpLayerColor=0;0;255IV_BEND;IV_BEND_DOWN;IV_OUTER_PROFILE;IV_INTERIOR_PROFILES;IV_FEATURE_PROFILES;IV_FEATURE_PROFILES_DOWN;IV_ALTREP_FRONT;IV_ALTREP_BACK;IV_ROLL_TANGENT;IV_ROLL&InvisibleLayers=IV_TANGENT;IV_TOOL_CENTER;IV_TOOL_CENTER_DOWN;IV_ARC_CENTERS;IV_UNCONSUMED_SKETCHES" _ + "&RebaseGeometry=True" _ + "&SimplifySplines=True" _ + "&SplineTolerance=0.01" _ odxfname = oPath & "\" & oTab.MemberName & ".dxf" oDef.DataIO.WriteDataToFile(odxf, odxfname) oDef.FlatPattern.ExitEdit MessageBox.Show ("DXF has been saved in this location: " + odxfname) Else MessageBox.Show ("There must be a sheetmetal component to get the dxf file!") End If Next
The VBA equivalent will take a lot of rework to remove System.IO reference and ilogic member change.
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan