|
DigiPara Liftdesigner LDX API
|
API method: ILDXSheetFrame5.CreateBIMExchangeZipEx
Treename: Sheets.
' from Samples/Src/LDXAPIExamples/Example_LDXSheetFrame.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc, APIHelpModes.InputParaDesktopWithOtherFileName, "API Example BIM Properties.ldbim"}, "Sheets.", "LDXSheetFrame~CreateBIMExchangeZipEx", "Create BIM exchange file (with BIM properties)")>
Public Shared Sub ExportAsLDBIM(ByRef ldxDocument As DigiPara.LDX.LDXDocument, ByVal SheetFilePath As String)
Dim frame As DigiPara.LDX.LDXSheetFrame = FindBIMExportFrame(ldxDocument)
If frame Is Nothing Then
MsgBox("No suitable frame found!")
Exit Sub
End If
' LDBIM exports contain RFA prototype families. This document property determines which Revit version they are compatible with. The minimum
' is Revit 2018.
ldxDocument.DocumentBIMSettings.TARGET_REVIT_VERSION = 2018
' cbefmExportBIMProperties activates BIM property export.
' cbefmUseBIMExportModes, like in the previous example, makes it so that only those components with BIM properties enabled get exported into their own 3DDWG file; that file
' then includes the geometry of all children without BIM properties. This saves space and increases the import speed.
Dim mode As DigiPara.LDX.CreateBIMExchangeFileModes = DigiPara.LDX.CreateBIMExchangeFileModes.cbefmExportBIMProperties Or DigiPara.LDX.CreateBIMExchangeFileModes.cbefmUseBIMExportModes
If (frame.ViewType And DigiPara.LDX.SheetFrameViewType.shfvt3D) = DigiPara.LDX.SheetFrameViewType.shfvt3D Then
' this flag makes the exported geometry as much like the geometry visible in the view frame. Without it, we take some liberties
' to better match the target format.
mode = mode Or DigiPara.LDX.CreateBIMExchangeFileModes.cbefmKeepViewFrameSettings
End If
frame.CreateBIMExchangeZipEx(SheetFilePath, "", "", mode)
End Sub