這里有沒(méi)有CST VBA資深工程師
最近想自己編寫一個(gè)CST的macro,不知道怎么從模型中提取出已經(jīng)設(shè)定好的參數(shù)變量?哪位能指導(dǎo)一下。
補(bǔ)充 :哪里有CST VBA的編程資料啊,急需
一會(huì)有人會(huì)告訴你向官方求助,
然后官方會(huì)告訴你請(qǐng)看help。
help 看半年了,沒(méi)找到有用的資料。
Help是最權(quán)威的官方資料!看了半年Help都不會(huì)編VBA?你有沒(méi)有看Help中Visual Basic (VBA) Language?
樓上表激動(dòng),CST help 寫的太差了。 有用的全沒(méi)寫出來(lái)。
開始寫代碼了, 目前還比較順利。
恭喜了LZ
cst的vba的確不好用,help中關(guān)于vba的部分也沒(méi)把keywords給全…
找起來(lái)是比較痛苦滴
確實(shí)很爛 , search也搜不出來(lái)。
我有個(gè)好辦法 就是先手動(dòng)做一變 去history list里查自動(dòng)生成的 改一改 就是了
但是 我也有一個(gè)問(wèn)題 如何用micro start transient solver? 誰(shuí)寫過(guò) 跟我說(shuō)說(shuō) 我前邊都寫好了 就是 不知道 怎么 start
小編,您好!我現(xiàn)在也在學(xué)VBA,能幫我看下這個(gè)程序嗎?為什么提示未找到文件啊。我已經(jīng)把cst文件和excel放在一起了啊。謝謝??!
Option Explicit
Sub mwsconnect()
' Next open a connection to CST DESIGN ENVIRONMENTDim studio As Object
Set studio = CreateObject("CSTStudio.Application")
' Now open the model file which is located in the same folder as the Excel sheet
' This will also return a connection to CST MICROWAVE STUDIO
Dim path As String
Dim fname As String
path = ActiveWorkbook.path
Dim mws As Object
Set mws = studio.OpenFile(path & "\lojiedigis1MHz_sinExcition.cst")
mws.DeleteResults
With mws.TimeSignal
.Reset
.Name "default"
.SignalType "Sine step"
.ProblemType "High Frequency"
.Ttotal "2"
.Phase "0.0"
.Frequency "1"
.RiseFactor "0.0001"
.Create
End With
mws.Rebuild
' Make a connection to the solver and start the simulation
mws.solver.Start
mws.Save
' Finally close the connection to CST MICROWAVE STUDIO
studio.Quit
Set studio = Nothing
End Sub