forked from linmingchih/HowtoSim_Script
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplate.py
More file actions
27 lines (22 loc) · 754 Bytes
/
Template.py
File metadata and controls
27 lines (22 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
config='''import os, sys, re, clr
try:
dll_dir='C:/Program Files/AnsysEM/AnsysEM19.3/Win64/common/IronPython/DLLs'
if not os.path.isdir(dll_dir):
raise Exception
except:
m=re.search('(.*Win64)', __file__)
dll_dir=m.group(1)+'/common/IronPython/DLLs'
finally:
sys.path.append(dll_dir)
clr.AddReference('IronPython.Wpf')
import wpf
from System.Windows import Window
os.chdir(os.path.dirname(__file__))
'''
exec(config)
#Code Start-----------------------------------
class MyWindow(Window):
def __init__(self, oDesktop):
wpf.LoadComponent(self, 'ChangeBoxSize.xaml')
#Code End-------------------------------------
MyWindow(oDesktop).ShowDialog()