Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Controlling HFSS from Matlab

Status
Not open for further replies.

kato01

Full Member level 2
Joined
Dec 2, 2002
Messages
123
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,298
Activity points
831
hello

I am in Matlab in a loop where I have to call HFSS. I need to:

1. load a project file,
2. change some variables values
3. run the optimization in it
4. export results
5. save project

I have this Matlab routine I wrote (mostly guessing) and the HFSS test project file attached.

Questions:

1. It looks like when the directory string includes spaces, it won't work. Is this true?
2. I can't get line 12 & 13 to work. Is the syntax correct?

oDesign = oProject.SetActiveDesign('HFSSDesign1')
oModule = oDesign.GetModule('Optimetrics')


Please let me know if this can be done at all. I spent too much time guessing.

Thanks

Katto01
 

I found the solution, so if any body needs this, here it is

%=============================== start
%Setup up project information

fln='i:\file.hfss';
%gln=strcat(dir,fln)
oAnsoftApp = actxserver('AnsoftHfss.HfssScriptInterface');
oDesktop = oAnsoftApp.GetAppDesktop();
oDesktop.RestoreWindow();
%oDesign = oProject.SetActiveDesign('HFSSDesign1')
oDesktop.OpenProject (fln)

oProject = oDesktop.SetActiveProject('file');
oDesign = oProject.SetActiveDesign('HFSSDesign1');

%oModule = oDesign.GetModule('ReportSetup');
oModule = oDesign.GetModule('Optimetrics');



%oProject = oDesktop.SetActiveProject('file');



%Set Variables

oProject.ChangeProperty({'NAME:AllTabs', {'NAME:projectVariableTab', {'NAME:propServers', ...
'ProjectVariables'}, {'NAME:ChangedProps', ...
{'NAME:$epsr', 'Value:=', '0.5'}, ...
{'NAME:$miur', 'Value:=', '3'}, ...
{'NAME:$etan_delta', 'Value:=', '.01'}, ...
{'NAME:$mtan_delta', 'Value:=', '.05'}}}});

%Save and Solve
oProject.Save();
oModule.SolveSetup('OptimizationSetup1')
%=============================== end
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top