Code:
Sub CATDrw_ExchangeTitleBlock(sMode as String)
Dim sCatiaFile as String
Tracer "CATDrw_ExchangeTitleBlock", "--> entering with sMode=" & sMode
IBMinit' if sCatDocType = "Diagram" then
' msgbox Translate("Exchange of Frame not supported, sorry")
' exit sub
' end if
' if CATCheckRef()=1 then
sCatiaFile = IBMGetCatiaTemplate(sMode)
Tracer "CATDrw_ExchangeTitleBlock", "IBMGetCatiaTemplate got:" & sCatiaFile
if sCatiaFile = "cancelled" then
exit sub
end if
if right(sCatiaFile,20) <> "KeepFrame.CATDrawing" then
Tracer "CATDrw_ExchangeTitleBlock", "Call ScanModel"
ScanModel 'scan contents of title block
' Tracer "CATDrw_ExchangeTitleBlock", "Call CATRemoveAll"
' CATRemoveAll 'clear background view in current model
Tracer "CATDrw_ExchangeTitleBlock", "Call IBMGetTitleBlock"
IBMGetTitleBlock(sCatiaFile) 'get the title block from template
' IBMinit 'set the current drawing info active
Tracer "CATDrw_ExchangeTitleBlock", "Call ModifyModel"
ModifyModel
end if
' else
' msgbox Translate("title identifier not found, change impossible")
' end if
Tracer "CATDrw_ExchangeTitleBlock", "--> leaving"
End Sub