Displaying Items

Displaying Items
 1import win32com.client
 2
 3# create the Browser automation object
 4my_browser = win32com.client.Dispatch("ImpactBrowser.Browser")
 5
 6# Note: Uncomment a single line below
 7
 8# to display a file
 9# my_browser.display_file(r"d:\Demo Drawings\3580.ipd")
10
11# remember we cannot use ipDrawingType.dtProject, ipDrawingType.dtSymbol or ipDrawingType.dtTemplate
12# directly in VBS because they have not previously been defined
13# instead use the values directly
14# ipDrawingType.dtProject = 0, ipDrawingType.dtSymbol = 1, ipDrawingType.dtTemplate = 2
15
16# to display an item using a specific key
17# my_browser.display_item_by_key 1362, 0        'ipDrawingType.dtProject
18# my_browser.display_item_by_key 185, 1        'ipDrawingType.dtSymbol
19
20# to display an item using a specific code
21# my_browser.display_item_by_code "P008672", 0
22
23# to display an item using a specific name
24# my_browser.display_item_by_name "FEF0200", 0
25# my_browser.display_item_by_name "Keep Dry", 1
26# my_browser.display_item_by_name "Simple Square", 2    'ipDrawingType.dtTemplate