-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd_fline.vbs
55 lines (36 loc) · 2.12 KB
/
add_fline.vbs
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
'--------------VBS to generate MSline on FPC board-------------------------------------
'Created by JJWW ....last modified date 59:21 30/12/2014.
'--------------VBS to generate MSline on FPC board-------------------------------------
'---------------12:56PM 31/12/2014------------------------------
'Base on added-on script, the function is used to add
' 1, Geometric parameters definition of tissue
' 2, Material properties into material library
' 3, Geometry box draw into mother drawing
'-----------------------------------------------------------------------
Dim oAnsoftApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule
Set oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oAnsoftApp.GetAppDesktop()
oDesktop.RestoreWindow
Set oProject = oDesktop.GetActiveProject()
Set oDesign = oProject.GetActiveDesign()
'--------------Define parameters-------------------------
'------------------------------------------------------------
'----------------------Fat (fatH)------1mm----------------------
'----------------------Blood (bloodH)----3mm----------------------
'----------------------Fat (fatH)------1mm----------------------
'------------------------------------------------------------
'--------------define materials----------------------------------------------------------------------------------------
'eps_fat =3.82 rho=1.65
'--------------define materials----------------------------------------------------------------------------------------
''''''''''''''''''''''''''''''''''Draw tissue''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.CreateBox Array("NAME:BoxParameters", "CoordinateSystemID:=", -1, "XPosition:=", _
"subx/2-5.8mm", "YPosition:=", "-1mm" , "ZPosition:=", "SubH+CuH+5mm", "XSize:=", "feedX", "YSize:=", _
"6mm", "ZSize:=", "CuH"), Array("NAME:Attributes", "Name:=", "fee1", "Flags:=", _
"", "Color:=", "(1 256 1)", "Transparency:=", 0.94, "PartCoordinateSystem:=", _
"Global", "MaterialName:=", "copper", "SolveInside:=", true)