求大神!将这段vbs如何转换成vb!!!,要vb6的

DimoAnsoftAppDimoDesktopDimoProjectDimoDesignDimoEditorDimoModuleSetoAnsoftApp=Create... 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.SetActiveProject("Tee1")
oProject.SaveAs "D:\Ansoft\Tee2.hfss", true
Set oDesign = oProject.SetActiveDesign("HFSSDesign1")
oDesign.SetSolutionType "DrivenModal"
Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.SetModelUnits Array("NAME:Units Parameter", "Units:=", "in", "Rescale:=", _
false)
oEditor.CreateBox Array("NAME:BoxParameters", "CoordinateSystemID:=", -1, "XPosition:=", _
"0in", "YPosition:=", "0in", "ZPosition:=", "0in", "XSize:=", "2in", "YSize:=", _
"0.9in", "ZSize:=", "0.4in"), Array("NAME:Attributes", "Name:=", "Box1", "Flags:=", _
"", "Color:=", "(132 132 193)", "Transparency:=", 0, "PartCoordinateSystem:=", _
"Global", "MaterialName:=", "vacuum", "SolveInside:=", true)
展开
 我来答
willy123698741
2012-04-26 · TA获得超过259个赞
知道小有建树答主
回答量:206
采纳率:0%
帮助的人:216万
展开全部
不用转换吧,直接新建一个Sub把代码放进去就行了,用的时候调用就行:
Sub VBSSub()
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.SetActiveProject("Tee1")
oProject.SaveAs "D:\Ansoft\Tee2.hfss", true
Set oDesign = oProject.SetActiveDesign("HFSSDesign1")
oDesign.SetSolutionType "DrivenModal"
Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.SetModelUnits Array("NAME:Units Parameter", "Units:=", "in", "Rescale:=", _
false)
oEditor.CreateBox Array("NAME:BoxParameters", "CoordinateSystemID:=", -1, "XPosition:=", _
"0in", "YPosition:=", "0in", "ZPosition:=", "0in", "XSize:=", "2in", "YSize:=", _
"0.9in", "ZSize:=", "0.4in"), Array("NAME:Attributes", "Name:=", "Box1", "Flags:=", _
"", "Color:=", "(132 132 193)", "Transparency:=", 0, "PartCoordinateSystem:=", _
"Global", "MaterialName:=", "vacuum", "SolveInside:=", true)
End Sub
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友d7c1d62e2d
2012-04-22 · 超过10用户采纳过TA的回答
知道答主
回答量:59
采纳率:0%
帮助的人:29.8万
展开全部
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
HotMousE
2012-04-22 · TA获得超过146个赞
知道小有建树答主
回答量:212
采纳率:100%
帮助的人:178万
展开全部
........代码?在哪?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
bdwjh007
2012-04-22 · TA获得超过804个赞
知道小有建树答主
回答量:1334
采纳率:92%
帮助的人:312万
展开全部
你的VBS代码呢?请贴出来
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式