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