Hallo.
Ich möchte aus einem Blech eine Abwickelung erstellen, und von dieser Abwickelung eine dxf. Soweit ist der Code auch in Ordnung, nur das er in der dxf die Mittellinie und Abkantungen mit rein macht. Ich möchte dass er nur die Außenkontur als dxf speichert.
Dazu müsste ich doch nur in:
Dim sOut As String
sOut = "FLAT PATTERN DXF?AcadVersion=2000"
den richtigen Wert eintragen.
Wer kann mir da helfen?
Danke!
Code:
'The sample code below writes a sheet metal file out as DXF. DWG is also supported. There are several optional arguments that can be specified as part of the format string. Below are the names of these arguments and their default values. The output will use these values unless you override them as part of the input string.
'TangentLayer = "IV_TANGENT"
'BendLayer = "IV_BEND"
'ToolCenterLayer = "IV_TOOL_CENTER"
'ArcCentersLayer = "IV_ARC_CENTERS"
'OuterProfileLayer = "IV_OUTER_PROFILE"
'FeatureProfilesLayer = "IV_FEATURE_PROFILES"
'InteriorProfilesLayer = "IV_INTERIOR_PROFILES"
'AcadVersion = "2000" (Can be "R12", "R13", "R14", or "2000")
'The following sample demonstrates creating an R12 DXF file that will have a layer called "Outer" where the curves for the outer shape will be created.
Public Sub WriteSheetMetalDXF()
' Get the active document. This assumes it is a part document.
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
' Ermitteln des Standortes und des Names der IPT.
' Die Abwicklung (DXF-Datei) wird in den gleichen Pfad geschrieben, wo die IPT steht.
' Sie hat den gleichen Namen wie die IPT - nur die Extension ist .DXF .
sDisplayName = oDoc.DisplayName
sFullName = oDoc.FullFileName
sName = Left$(sDisplayName, Len(sDisplayName) - 4) + ".dxf"
sPath = Left$(sFullName, Len(sFullName) - Len(sDisplayName)) ' Get the DataIO object.
Dim oDataIO As DataIO
Set oDataIO = oDoc.ComponentDefinition.DataIO
' Build the string that defines the format of the DXF file.
Dim sOut As String
sOut = "FLAT PATTERN DXF?AcadVersion=2000"
' Create the DXF file.
oDataIO.WriteDataToFile sOut, sPath + sName
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP