Export CST data via VBA macro

Status
Not open for further replies.

dj1uc

Newbie level 4
Joined
Aug 17, 2021
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
51
Hello everybody,

I export surface currents calculated by CST on a PEC cylinder using the following code:


Sub Main ()

SelectTreeItem ("2D/3D Results\Surface Current\surface current (f=30) [Mode 1]")

With ASCIIExport
.Reset
.FileName "mode 1.txt"
.Execute
End With

End Sub



By which command is it possible to select a destination folder, to which the data are exported? Because CST saves the txt file to some default folder and I'd like to choose the destination folder myself.
 

Hello Klaus,

yes I tried


.FileName "C:\Users\ZTSMT\Desktop\Ückerseifer\Basiswechsel\CST\Daten\Draht\HIRF\Moden\mode 1.txt"


but it did not work, unfortunately!
 

Hi

"it did not work" is not very descriptive.

So please tell us what happened.

Klaus

Btw: I see an "Ü" and a space in your path/filename.
For compatibility reasons I´d avoid them.

We don´t know what OS and version you use.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…