⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 temhornmacro.vbs

📁 用matlab调用HFSS代码hfssapi.rar
💻 VBS
📖 第 1 页 / 共 2 页
字号:
"YCenter:=", "0.000000mm", _
"ZCenter:=", "-58.400000mm", _
"Radius:=", "4.953000mm", _
"WhichAxis:=", "Z"), _
Array("NAME:Attributes", _
"Name:=", "coaxOuterCover_Edge1", _
"Flags:=", "", _
"Color:=", "(132 132 193)", _
"Transparency:=", 0, _
"PartCoordinateSystem:=", "Global", _
"MaterialName:=", "vacuum", _
"SolveInside:=", true)
oEditor.CreateCircle _
Array("NAME:CircleParameters", _
"IsCovered:=", false, _
"XCenter:=", "-94.900000mm", _
"YCenter:=", "0.000000mm", _
"ZCenter:=", "-5.840000mm", _
"Radius:=", "4.953000mm", _
"WhichAxis:=", "Z"), _
Array("NAME:Attributes", _
"Name:=", "coaxOuterCover_Edge2", _
"Flags:=", "", _
"Color:=", "(132 132 193)", _
"Transparency:=", 0, _
"PartCoordinateSystem:=", "Global", _
"MaterialName:=", "vacuum", _
"SolveInside:=", true)

oEditor.Connect _
Array("NAME:Selections", _
"Selections:=", _
"coaxOuterCover_Edge1,coaxOuterCover_Edge2")

oEditor.ChangeProperty _
Array("NAME:AllTabs", _
Array("NAME:Geometry3DAttributeTab", _
Array("NAME:PropServers", "coaxOuterCover_Edge1"), _
Array("NAME:ChangedProps", _
Array("NAME:Name", _
"Value:=", "coaxOuterCover"))))

Set oModule = oDesign.GetModule("BoundarySetup")
oModule.AssignPerfectE _
Array("NAME:FeedMetals", _
"InfGroundPlane:=", false, _
"Objects:=", _
Array("coaxOuterCover"))

oEditor.AssignMaterial _
	Array("NAME:Selections", _
		"Selections:=", "coaxInner"), _
	Array("NAME:Attributes", _
		"MaterialName:=", "pec", _
		"SolveInside:=", false)

oEditor.AssignMaterial _
	Array("NAME:Selections", _
		"Selections:=", "coaxOuter"), _
	Array("NAME:Attributes", _
		"MaterialName:=", "Teflon (tm)", _
		"SolveInside:=", true)
oEditor.CreateCircle _
Array("NAME:CircleParameters", _
"IsCovered:=", true, _
"XCenter:=", "-94.900000mm", _
"YCenter:=", "0.000000mm", _
"ZCenter:=", "5.840000mm", _
"Radius:=", "1.524000mm", _
"WhichAxis:=", "Z"), _
Array("NAME:Attributes", _
"Name:=", "HornPlate1_FeedCut", _
"Flags:=", "", _
"Color:=", "(132 132 193)", _
"Transparency:=", 0, _
"PartCoordinateSystem:=", "Global", _
"MaterialName:=", "vacuum", _
"SolveInside:=", true)
oEditor.CreateCircle _
Array("NAME:CircleParameters", _
"IsCovered:=", true, _
"XCenter:=", "-94.900000mm", _
"YCenter:=", "0.000000mm", _
"ZCenter:=", "-5.840000mm", _
"Radius:=", "4.953000mm", _
"WhichAxis:=", "Z"), _
Array("NAME:Attributes", _
"Name:=", "HornPlate2_FeedCut", _
"Flags:=", "", _
"Color:=", "(132 132 193)", _
"Transparency:=", 0, _
"PartCoordinateSystem:=", "Global", _
"MaterialName:=", "vacuum", _
"SolveInside:=", true)

oEditor.Subtract _
Array("NAME:Selections", _
"Blank Parts:=", _
"HornPlate1", _
"Tool Parts:=", _
"HornPlate1_FeedCut"), _
Array("NAME:SubtractParameters", _
"KeepOriginals:=", false) 

oEditor.Subtract _
Array("NAME:Selections", _
"Blank Parts:=", _
"HornPlate1_1", _
"Tool Parts:=", _
"HornPlate2_FeedCut"), _
Array("NAME:SubtractParameters", _
"KeepOriginals:=", false) 
oEditor.CreateCircle _
Array("NAME:CircleParameters", _
"IsCovered:=", true, _
"XCenter:=", "-94.900000mm", _
"YCenter:=", "0.000000mm", _
"ZCenter:=", "-58.400000mm", _
"Radius:=", "4.953000mm", _
"WhichAxis:=", "Z"), _
Array("NAME:Attributes", _
"Name:=", "PortCircle", _
"Flags:=", "", _
"Color:=", "(132 132 193)", _
"Transparency:=", 0, _
"PartCoordinateSystem:=", "Global", _
"MaterialName:=", "vacuum", _
"SolveInside:=", true)

Set oModule = oDesign.GetModule("BoundarySetup") 

oModule.AssignWavePort _
Array( _
"NAME:Port1", _
"NumModes:=", 1, _
"PolarizeEField:=",  false, _
"DoDeembed:=", false, _
"DoRenorm:=", false, _
Array("NAME:Modes", _
Array("NAME:Mode1", _
"ModeNum:=",  1, _
"UseIntLine:=", false) _
), _
"Objects:=", Array("PortCircle")) 

oEditor.CreateCylinder _
Array("NAME:CylinderParameters", _
"XCenter:=", "-94.900000mm", _
"YCenter:=", "0.000000mm", _
"ZCenter:=", "-58.400000mm", _
"Radius:=", "4.953000mm", _
"Height:=", "-0.100000mm", _
"WhichAxis:=", "Z"), _
Array("NAME:Attributes", _
"Name:=", "PortCap", _
"Flags:=", "", _
"Color:=", "(132 132 193)", _
"Transparency:=", 0, _
"PartCoordinateSystem:=", "Global", _
"MaterialName:=", "vacuum", _
"SolveInside:=", true)


oEditor.AssignMaterial _
	Array("NAME:Selections", _
		"Selections:=", "PortCap"), _
	Array("NAME:Attributes", _
		"MaterialName:=", "pec", _
		"SolveInside:=", false)

oEditor.Move _
Array("NAME:Selections", _
"Selections:=", "HornPlate1,HornPlate1_1,PortCircle,coaxInner,coaxOuterCover,coaxOuter,PortCap"), _
Array("NAME:TranslateParameters", _
"TranslateVectorX:=", "0.000000mm", _
"TranslateVectorY:=", "0.000000mm", _
"TranslateVectorZ:=", "-906.000000mm")

oEditor.DuplicateAlongLine _
Array("NAME:Selections", _
"Selections:=", "HornPlate1,HornPlate1_1,PortCircle,coaxInner,coaxOuterCover,coaxOuter,PortCap"), _
Array("NAME:DuplicateToAlongLineParameters", _
"XComponent:=", "0.000000mm", _
"YComponent:=", "0.000000mm", _
"ZComponent:=", "604.000000mm", _
"NumClones:=", 4), _
Array("NAME:Options", _
"DuplicateBoundaries:=", true)

Set oModule = oDesign.GetModule("AnalysisSetup")
oModule.InsertSetup "HfssDriven", _
Array("NAME:Setup120MHz", _
"Frequency:=", "0.120000GHz", _
"PortsOnly:=", false, _
"maxDeltaS:=", 0.020000, _
"UseMatrixConv:=", false, _
"MaximumPasses:=", 25, _
"MinimumPasses:=", 1, _
"MinimumConvergedPasses:=", 1, _
"PercentRefinement:=", 20, _
"ReducedSolutionBasis:=", false, _
"DoLambdaRefine:=", true, _
"DoMaterialLambda:=", true, _
"Target:=", 0.3333, _
"PortAccuracy:=", 2, _
"SetPortMinMaxTri:=", false)

Set oModule = oDesign.GetModule("AnalysisSetup")
oModule.InsertSetup "HfssDriven", _
Array("NAME:Setup150MHz", _
"Frequency:=", "0.150000GHz", _
"PortsOnly:=", false, _
"maxDeltaS:=", 0.020000, _
"UseMatrixConv:=", false, _
"MaximumPasses:=", 25, _
"MinimumPasses:=", 1, _
"MinimumConvergedPasses:=", 1, _
"PercentRefinement:=", 20, _
"ReducedSolutionBasis:=", false, _
"DoLambdaRefine:=", true, _
"DoMaterialLambda:=", true, _
"Target:=", 0.3333, _
"PortAccuracy:=", 2, _
"SetPortMinMaxTri:=", false)

Set oModule = oDesign.GetModule("AnalysisSetup")
oModule.InsertSetup "HfssDriven", _
Array("NAME:Setup225MHz", _
"Frequency:=", "0.225000GHz", _
"PortsOnly:=", false, _
"maxDeltaS:=", 0.020000, _
"UseMatrixConv:=", false, _
"MaximumPasses:=", 25, _
"MinimumPasses:=", 1, _
"MinimumConvergedPasses:=", 1, _
"PercentRefinement:=", 20, _
"ReducedSolutionBasis:=", false, _
"DoLambdaRefine:=", true, _
"DoMaterialLambda:=", true, _
"Target:=", 0.3333, _
"PortAccuracy:=", 2, _
"SetPortMinMaxTri:=", false)

Set oModule = oDesign.GetModule("AnalysisSetup")
oModule.InsertSetup "HfssDriven", _
Array("NAME:Setup300MHz", _
"Frequency:=", "0.300000GHz", _
"PortsOnly:=", false, _
"maxDeltaS:=", 0.020000, _
"UseMatrixConv:=", false, _
"MaximumPasses:=", 25, _
"MinimumPasses:=", 1, _
"MinimumConvergedPasses:=", 1, _
"PercentRefinement:=", 20, _
"ReducedSolutionBasis:=", false, _
"DoLambdaRefine:=", true, _
"DoMaterialLambda:=", true, _
"Target:=", 0.3333, _
"PortAccuracy:=", 2, _
"SetPortMinMaxTri:=", false)

oProject.SaveAs _
    "C:\Vijay\temHornEPlaneArraySnow.hfss", _
    true

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -