I searched in different forums (French and English) but I can't find the answer.
We use DXF export for a supplier that does laser cutting exclusively, but we want to add an "engraving" with the plan number. To do this, our supplier requires that the text to be engraved be present in the dxf under a "T" layer (for his machine is automatic). For the moment, the method used is as follows:
Creating a drawing view in the desired orientation
Rename the saw to "DXF"
Added a note related to the custom property "Plan No."
Selecting the view is "save views as" at the very bottom of the FeatureManager
With the custom projection option, we use a projection file that allows us to save the lines of the model in a "0" layer and the notes in a "T" layer
For the moment it's working really well. Except that, I'd like to automate it with a macro. Knowing that we already have a macro to save the drawing in PDF + DWG format, and the model in STEP format (by adding the clues in the file name). The goal would be to have a macro for the dxf and integrate it into our existing macro by saying "if the "DXF" view exists, then we save it in DXF format using the projection options etc etc.
Does it seem feasible to you? The problem is that I can't find any trace of a macro to record a VUE in DXF format.
Sub export_view()
Dim st As Boolean
st = swmodel.Extension.SelectByID2("DXF", "DRAWINGVIEW", 0, 0, 0, False, 0, Nothing, 0)
If st Then
swmodel.EditCopy
swdraw.NewSheet4 "tmp", 0, 13, 1, 1, False, "", 0, 0, "", 0, 0, 0, 0, 0, 0
swmodel.Paste
'save as dxf
'delete temp_sheet
Else
End If
End Sub
<< I would like to point out that the drilling tables linked to the view are also copied, to be managed according to the need >>