微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > Matlab controlling ANSYS Designer

Matlab controlling ANSYS Designer

时间:03-30 整理:3721RD 点击:
Hello,

I am trying to control ANSYS' Designer with Matlab

The following is a working command which draws a polygon:

invoke(oEditor,'CreatePolygon', {'NAME:Contents', 'polyGeometry:=', {'Name:=','Dipole_Top_Arm','LayerName:=','Dipole_T race','lw:=','0mm','n:=',5,'U:=','mm', 'x:=',0.5,'y:=',1,'x:=',2,'y:=',1,'x:=',5,'y:=',10 ,'x:=',-5,'y:=',10,'x:=',-2,'y:=',1,'x:=',0.5, 'y:=',1}}); (1)

As one can see, the command has a section which defines the number of points <<'n:=',5>> and another section that defines the coordinates of the points

<<'x:=',0.5,'y:=',1,'x:=',2,'y:=',1,'x:=',5,'y:=', 10,'x:=',-5,'y:=',10,'x:=',-2,'y:=',1,'x:=',0.5, 'y:=',1}>> (2)

Since the number of points is a variable, I need to be able to define a number of coordinate sets, which I could define as an array, something like

A(1)='x:=',0.5,'y:=',1
A(2)='x:=',2,'y:=',1 … etc

and then rather than writing the series above (2), just A, like

invoke(oEditor,'CreatePolygon', {'NAME:Contents', 'polyGeometry:=', {'Name:=','Dipole_Top_Arm','LayerName:=','Dipole_T race','lw:=','0mm','n:=',5,'U:=','mm', A}})


All my attemps failed. One of them is

A{1}=strcat(q,'x:=',q,num2str(0.5),v,q,'y:=',q,num 2str(1),q,v); where

q=char(39) <<'>>
v=char(44) <<,>>

Any ideas?

I haven't used Designer before, But I used to use script to control HFSS. I guess they are similar. So I suggest you can use the script record function to generate the script by Designer itself. Then you can edit this auto-generated script according to your requirements

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top