Exporting a drawing

Exporting a drawing
 1# This example shows how to load a master tool setting and export a drawing
 2impact.gui.output_toolbox.clear()
 3
 4settings_name = "Standard Import/Export"
 5
 6# Get some settings from the active database for the export
 7ms = impact.active_database.find_master_tool_setting(settings_name, ipMasterSettingType.mstImportExport)
 8
 9# Check that the settings were found
10if not ms.isNone():
11
12    # Perform the file export
13    if impact.active_drawing.export("d:\1.pdf", ms, ipFileFormat.ffAdobePDF):
14        impact.gui.output_toolbox.add("File exported successfully")
15    else:
16        impact.gui.output_toolbox.add("File exported failed")
17
18else:
19    impact.gui.output_toolbox.add("Unable to locate settings '" + str(settings_name) + "'")
20
21
22
23
24